Skip to content

Commit

Permalink
Install Android NDK r25b on Windows VM (#1965)
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorcloudy authored Jun 3, 2024
1 parent fcd3cdd commit d3fbef2
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions buildkite/setup-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -195,17 +195,31 @@ New-Item "c:\bazel" -ItemType "directory" -Force
$env:PATH = [Environment]::GetEnvironmentVariable("PATH", "Machine") + ";c:\bazel"
[Environment]::SetEnvironmentVariable("PATH", $env:PATH, "Machine")

## Download the Android NDK and install into C:\android-ndk-r15c.
## Download the Android NDK r15c and install into C:\android-ndk\r15c.
Write-Host "Installing Android NDK r15c..."
$android_ndk_url = "https://dl.google.com/android/repository/android-ndk-r15c-windows-x86_64.zip"
$android_ndk_zip = "c:\temp\android_ndk.zip"
$android_ndk_root = "c:\android_ndk"
New-Item $android_ndk_root -ItemType "directory" -Force
(New-Object Net.WebClient).DownloadFile($android_ndk_url, $android_ndk_zip)
[System.IO.Compression.ZipFile]::ExtractToDirectory($android_ndk_zip, $android_ndk_root)
Rename-Item "${android_ndk_root}\android-ndk-r15c" -NewName "r15c"
Remove-Item $android_ndk_zip

Write-Host "Installing Android NDK r25b..."
## Download the Android NDK r25b and install into C:\android-ndk\r25b.
$android_ndk_url = "https://dl.google.com/android/repository/android-ndk-r25b-windows.zip"
$android_ndk_zip = "c:\temp\android_ndk.zip"
$android_ndk_root = "c:\android_ndk"
New-Item $android_ndk_root -ItemType "directory" -Force
(New-Object Net.WebClient).DownloadFile($android_ndk_url, $android_ndk_zip)
[System.IO.Compression.ZipFile]::ExtractToDirectory($android_ndk_zip, $android_ndk_root)
Rename-Item "${android_ndk_root}\android-ndk-r25b" -NewName "r25b"
Remove-Item $android_ndk_zip

## Set the ANDROID_NDK_HOME environment variable to r15c.
[Environment]::SetEnvironmentVariable("ANDROID_NDK_HOME", "${android_ndk_root}\r15c", "Machine")
$env:ANDROID_NDK_HOME = [Environment]::GetEnvironmentVariable("ANDROID_NDK_HOME", "Machine")
Remove-Item $android_ndk_zip

## Download the Android SDK and install into C:\android_sdk.
$android_sdk_url = "https://dl.google.com/android/repository/commandlinetools-win-7302050_latest.zip"
Expand Down

0 comments on commit d3fbef2

Please sign in to comment.