mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
[Windows] Hardcode command line tools (#6963)
This commit is contained in:
@@ -5,22 +5,9 @@
|
|||||||
|
|
||||||
# get packages to install from the toolset
|
# get packages to install from the toolset
|
||||||
$androidToolset = (Get-ToolsetContent).android
|
$androidToolset = (Get-ToolsetContent).android
|
||||||
|
# Newer version(s) require Java 11 by default
|
||||||
# install latest command-line tools
|
# See https://github.com/actions/runner-images/issues/6960
|
||||||
$cmdlineToolsVersion = $androidToolset."cmdline-tools"
|
$cmdlineToolsUrl = "https://dl.google.com/android/repository/commandlinetools-win-9123335_latest.zip"
|
||||||
if ($cmdlineToolsVersion -eq "latest") {
|
|
||||||
$googlePkgs = Invoke-RestMethod "https://dl.google.com/android/repository/repository2-1.xml"
|
|
||||||
$cmdlineToolsVersion = $googlePkgs.SelectSingleNode(
|
|
||||||
"//remotePackage[@path='cmdline-tools;latest']/archives/archive/complete/url[starts-with(text(), 'commandlinetools-win-')]"
|
|
||||||
).'#text'
|
|
||||||
|
|
||||||
if (-not $cmdlineToolsVersion) {
|
|
||||||
Write-Host "Failed to parse latest command-line tools version"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$cmdlineToolsUrl = "https://dl.google.com/android/repository/${cmdlineToolsVersion}"
|
|
||||||
$cmdlineToolsArchPath = Start-DownloadWithRetry -Url $cmdlineToolsUrl -Name "cmdline-tools.zip"
|
$cmdlineToolsArchPath = Start-DownloadWithRetry -Url $cmdlineToolsUrl -Name "cmdline-tools.zip"
|
||||||
$sdkInstallRoot = "C:\Program Files (x86)\Android\android-sdk"
|
$sdkInstallRoot = "C:\Program Files (x86)\Android\android-sdk"
|
||||||
$sdkRoot = "C:\Android\android-sdk"
|
$sdkRoot = "C:\Android\android-sdk"
|
||||||
|
|||||||
@@ -162,7 +162,6 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"android": {
|
"android": {
|
||||||
"cmdline-tools": "latest",
|
|
||||||
"platform_min_version": "19",
|
"platform_min_version": "19",
|
||||||
"build_tools_min_version": "19.1.0",
|
"build_tools_min_version": "19.1.0",
|
||||||
"extra_list": [
|
"extra_list": [
|
||||||
|
|||||||
@@ -141,7 +141,6 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"android": {
|
"android": {
|
||||||
"cmdline-tools": "latest",
|
|
||||||
"platform_min_version": "27",
|
"platform_min_version": "27",
|
||||||
"build_tools_min_version": "27.0.0",
|
"build_tools_min_version": "27.0.0",
|
||||||
"extra_list": [
|
"extra_list": [
|
||||||
|
|||||||
Reference in New Issue
Block a user