[macOS] Hardcode command line tools (#6965)
This commit is contained in:
@@ -35,23 +35,9 @@ ANDROID_NDK_MAJOR_VERSIONS=($(get_toolset_value '.android.ndk."versions"[]'))
|
|||||||
ANDROID_NDK_MAJOR_DEFAULT=$(get_toolset_value '.android.ndk.default')
|
ANDROID_NDK_MAJOR_DEFAULT=$(get_toolset_value '.android.ndk.default')
|
||||||
ANDROID_NDK_MAJOR_LATEST=$(get_toolset_value '.android.ndk."versions"[-1]')
|
ANDROID_NDK_MAJOR_LATEST=$(get_toolset_value '.android.ndk."versions"[-1]')
|
||||||
# Get the latest command line tools from https://developer.android.com/studio#cmdline-tools
|
# Get the latest command line tools from https://developer.android.com/studio#cmdline-tools
|
||||||
cmdlineToolsVersion=$(get_toolset_value '.android."cmdline-tools"')
|
# Newer version(s) require Java 11 by default
|
||||||
if [[ $cmdlineToolsVersion == "latest" ]]; then
|
# See https://github.com/actions/runner-images/issues/6960
|
||||||
repositoryXmlUrl="https://dl.google.com/android/repository/repository2-1.xml"
|
ANDROID_OSX_SDK_URL="https://dl.google.com/android/repository/commandlinetools-mac-9123335_latest.zip"
|
||||||
download_with_retries $repositoryXmlUrl "/tmp" "repository2-1.xml"
|
|
||||||
cmdlineToolsVersion=$(
|
|
||||||
yq -p=xml \
|
|
||||||
'.sdk-repository.remotePackage[] | select(."+@path" == "cmdline-tools;latest").archives.archive[].complete.url | select(contains("commandlinetools-mac"))' \
|
|
||||||
/tmp/repository2-1.xml
|
|
||||||
)
|
|
||||||
|
|
||||||
if [[ -z $cmdlineToolsVersion ]]; then
|
|
||||||
echo "Failed to parse latest command-line tools version"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
ANDROID_OSX_SDK_URL="https://dl.google.com/android/repository/${cmdlineToolsVersion}"
|
|
||||||
ANDROID_HOME=$HOME/Library/Android/sdk
|
ANDROID_HOME=$HOME/Library/Android/sdk
|
||||||
ANDROID_OSX_SDK_FILE=tools-macosx.zip
|
ANDROID_OSX_SDK_FILE=tools-macosx.zip
|
||||||
|
|
||||||
|
|||||||
@@ -165,7 +165,6 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"android": {
|
"android": {
|
||||||
"cmdline-tools": "latest",
|
|
||||||
"platform_min_version": "24",
|
"platform_min_version": "24",
|
||||||
"build_tools_min_version": "24.0.0",
|
"build_tools_min_version": "24.0.0",
|
||||||
"extra-list": [
|
"extra-list": [
|
||||||
|
|||||||
@@ -165,7 +165,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": [
|
||||||
|
|||||||
@@ -132,7 +132,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