diff --git a/buildkite/setup-windows.ps1 b/buildkite/setup-windows.ps1 index a351aed946..c90ae33cef 100755 --- a/buildkite/setup-windows.ps1 +++ b/buildkite/setup-windows.ps1 @@ -195,7 +195,8 @@ 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" @@ -203,9 +204,22 @@ 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"