File tree Expand file tree Collapse file tree
.github/workflows/scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -653,13 +653,14 @@ install_android_sdk() {
653653 # guess some common places where the swift-sdks file lives
654654 cd ~ /Library/org.swift.swiftpm || cd ~ /.config/swiftpm || cd ~ /.local/swiftpm || cd ~ /.swiftpm || cd /root/.swiftpm
655655
656+ # permit the "--android-ndk" flag to override the default
657+ local android_ndk_version=" ${ANDROID_NDK_VERSION:- r27d} "
658+
656659 # Download and install the Android NDK.
657660 # Note that we could use the system package manager, but it is
658661 # named different things for different distributions
659662 # (e.g., "google-android-ndk-r26-installer" on Debian)
660- if [[ ! -d " ${ANDROID_NDK_HOME:- } " ]]; then
661- # permit the "--android-ndk" flag to override the default
662- local android_ndk_version=" ${ANDROID_NDK_VERSION:- r27d} "
663+ if [[ ! -d " ${ANDROID_NDK_HOME:- } " || ! $( grep " Pkg.ReleaseName = ${android_ndk_version} " " ${ANDROID_NDK_HOME} /source.properties" ) ]]; then
663664 curl_with_retry -fsSL -o ndk.zip https://dl.google.com/android/repository/android-ndk-" ${android_ndk_version} " -" $( uname -s) " .zip
664665 command -v unzip > /dev/null || install_package unzip
665666 unzip -q ndk.zip
You can’t perform that action at this time.
0 commit comments