diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index f540ce20ab..d2e576b65e 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -98,26 +98,26 @@ jobs: id: cache_ndk uses: actions/cache@v3 with: - path: /tmp/android-ndk-r21e - key: android-ndk-${{ matrix.os }}-r21e + path: /tmp/android-ndk-r23c + key: android-ndk-${{ matrix.os }}-r23c - name: Check cached NDK shell: bash if: steps.cache_ndk.outputs.cache-hit != 'true' run: | # If the NDK failed to download from the cache, but there is a - # /tmp/android-ndk-r21e directory, it's incomplete, so remove it. - if [[ -d "/tmp/android-ndk-r21e" ]]; then + # /tmp/android-ndk-r23c directory, it's incomplete, so remove it. + if [[ -d "/tmp/android-ndk-r23c" ]]; then echo "Removing incomplete download of NDK" - rm -rf /tmp/android-ndk-r21e + rm -rf /tmp/android-ndk-r23c fi - name: Install prerequisites shell: bash run: | build_scripts/android/install_prereqs.sh - echo "NDK_ROOT=/tmp/android-ndk-r21e" >> $GITHUB_ENV - echo "ANDROID_NDK_HOME=/tmp/android-ndk-r21e" >> $GITHUB_ENV + echo "NDK_ROOT=/tmp/android-ndk-r23c" >> $GITHUB_ENV + echo "ANDROID_NDK_HOME=/tmp/android-ndk-r23c" >> $GITHUB_ENV - name: Add strings.exe to PATH (Windows only) if: startsWith(matrix.os, 'windows') diff --git a/.github/workflows/cpp-packaging.yml b/.github/workflows/cpp-packaging.yml index dd8fff4217..65697ba0ef 100644 --- a/.github/workflows/cpp-packaging.yml +++ b/.github/workflows/cpp-packaging.yml @@ -267,8 +267,8 @@ jobs: id: cache_ndk uses: actions/cache@v3 with: - path: /tmp/android-ndk-r21e - key: android-ndk-${{ runner.os }}-r21e + path: /tmp/android-ndk-r23c + key: android-ndk-${{ runner.os }}-r23c - name: install prerequisites run: sdk-src/build_scripts/android/install_prereqs.sh diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 634a93f6df..cc4f73bc0d 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -436,8 +436,8 @@ jobs: id: cache_ndk uses: actions/cache@v3 with: - path: /tmp/android-ndk-r21e - key: android-ndk-${{ matrix.os }}-r21e + path: /tmp/android-ndk-r23c + key: android-ndk-${{ matrix.os }}-r23c - name: Setup python uses: actions/setup-python@v4 with: diff --git a/build_scripts/android/build.sh b/build_scripts/android/build.sh index 0f4d63cb94..b33191412a 100755 --- a/build_scripts/android/build.sh +++ b/build_scripts/android/build.sh @@ -27,15 +27,15 @@ absbuildpath=$( pwd -P ) cd "${origpath}" # If NDK_ROOT is not set or is the wrong version, use to the version in /tmp. -if [[ -z "${NDK_ROOT}" || -z $(grep "Pkg\.Revision = 21\." "${NDK_ROOT}/source.properties") ]]; then - if [[ ! -d /tmp/android-ndk-r21e ]]; then - echo "Recommended NDK version r21e not present in /tmp." +if [[ -z "${NDK_ROOT}" || -z $(grep "Pkg\.Revision = 23\." "${NDK_ROOT}/source.properties") ]]; then + if [[ ! -d /tmp/android-ndk-r23c ]]; then + echo "Recommended NDK version r23c not present in /tmp." echo "Please run install_prereqs.sh if you wish to use the recommended NDK version." echo "Continuing with default NDK..." sleep 2 fi - export NDK_ROOT=/tmp/android-ndk-r21e - export ANDROID_NDK_HOME=/tmp/android-ndk-r21e + export NDK_ROOT=/tmp/android-ndk-r23c + export ANDROID_NDK_HOME=/tmp/android-ndk-r23c fi cd "${sourcepath}" set +e diff --git a/build_scripts/android/install_prereqs.sh b/build_scripts/android/install_prereqs.sh index 396d2b85b8..e6f652d055 100755 --- a/build_scripts/android/install_prereqs.sh +++ b/build_scripts/android/install_prereqs.sh @@ -60,13 +60,13 @@ if [[ -z "${ANDROID_HOME}" ]]; then exit 1 fi -if [[ -z "${NDK_ROOT}" || -z $(grep "Pkg\.Revision = 21\." "${NDK_ROOT}/source.properties") ]]; then - if [[ -d /tmp/android-ndk-r21e && \ - -n $(grep "Pkg\.Revision = 21\." "/tmp/android-ndk-r21e/source.properties") ]]; then - echo "Using NDK r21e in /tmp/android-ndk-r21e". +if [[ -z "${NDK_ROOT}" || -z $(grep "Pkg\.Revision = 23\." "${NDK_ROOT}/source.properties") ]]; then + if [[ -d /tmp/android-ndk-r23c && \ + -n $(grep "Pkg\.Revision = 23\." "/tmp/android-ndk-r23c/source.properties") ]]; then + echo "Using NDK r23c in /tmp/android-ndk-r23c". else echo "NDK_ROOT environment variable is not set, or NDK version is incorrect." - echo "This build recommends NDK r21e, downloading..." + echo "This build recommends NDK r23c, downloading..." if [[ -z $(which curl) ]]; then echo "Error, could not run 'curl' to download NDK. Is it in your PATH?" exit 1 @@ -77,12 +77,12 @@ if [[ -z "${NDK_ROOT}" || -z $(grep "Pkg\.Revision = 21\." "${NDK_ROOT}/source.p for retry in {1..10} error; do if [[ $retry == "error" ]]; then exit 5; fi curl --http1.1 -LSs \ - "https://dl.google.com/android/repository/android-ndk-r21e-${platform}-x86_64.zip" \ - --output /tmp/android-ndk-r21e.zip && break + "https://dl.google.com/android/repository/android-ndk-r23c-${platform}.zip" \ + --output /tmp/android-ndk-r23c.zip && break sleep 300 done set -e - (cd /tmp && unzip -oq android-ndk-r21e.zip && rm -f android-ndk-r21e.zip) - echo "NDK r21e has been downloaded into /tmp/android-ndk-r21e" + (cd /tmp && unzip -oq android-ndk-r23c.zip && rm -f android-ndk-r23c.zip) + echo "NDK r23c has been downloaded into /tmp/android-ndk-r23c" fi fi diff --git a/release_build_files/readme.md b/release_build_files/readme.md index 73114acf4f..d4362d01c8 100644 --- a/release_build_files/readme.md +++ b/release_build_files/readme.md @@ -631,6 +631,11 @@ workflow use only during the development of your app, not for publicly shipping code. ## Release Notes +### Upcoming +- Changes + - GGeneral (Android): Firebase C++ on Android is now built against NDK + version r23c. + ### 12.6.0 - Changes - General (iOS): Update to Firebase Cocoapods version 11.8.1. diff --git a/scripts/gha/install_test_workflow_prereqs.sh b/scripts/gha/install_test_workflow_prereqs.sh index 622cc43be3..74d6a9237e 100755 --- a/scripts/gha/install_test_workflow_prereqs.sh +++ b/scripts/gha/install_test_workflow_prereqs.sh @@ -74,8 +74,8 @@ fi if [[ "${TEST_ONLY}" == "" ]]; then if [[ "${PLATFORM}" == "Android" ]]; then - echo "NDK_ROOT=/tmp/android-ndk-r21e" >> $GITHUB_ENV - echo "ANDROID_NDK_HOME=/tmp/android-ndk-r21e" >> $GITHUB_ENV + echo "NDK_ROOT=/tmp/android-ndk-r23c" >> $GITHUB_ENV + echo "ANDROID_NDK_HOME=/tmp/android-ndk-r23c" >> $GITHUB_ENV build_scripts/android/install_prereqs.sh elif [[ "${PLATFORM}" == "iOS" ]]; then build_scripts/ios/install_prereqs.sh