diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index b15871c789..a62c9b5e4d 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -92,18 +92,18 @@ jobs: id: cache_ndk uses: actions/cache@v2 with: - path: /tmp/android-ndk-r16b - key: android-ndk-${{ matrix.os }}-r16b + path: /tmp/android-ndk-r21e + key: android-ndk-${{ matrix.os }}-r21e - 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-r16b directory, it's incomplete, so remove it. - if [[ -d "/tmp/android-ndk-r16b" ]]; then + # /tmp/android-ndk-r21e directory, it's incomplete, so remove it. + if [[ -d "/tmp/android-ndk-r21e" ]]; then echo "Removing incomplete download of NDK" - rm -rf /tmp/android-ndk-r16b + rm -rf /tmp/android-ndk-r21e fi - name: Update homebrew (avoid bintray errors) diff --git a/.github/workflows/cpp-packaging.yml b/.github/workflows/cpp-packaging.yml index 48604ecbee..8ef02e6dae 100644 --- a/.github/workflows/cpp-packaging.yml +++ b/.github/workflows/cpp-packaging.yml @@ -237,13 +237,11 @@ jobs: path: firebase-cpp-sdk-ios-tvos-package.tgz build_and_package_android: - name: build-and-package-android-${{matrix.stl}} + name: build-and-package-android runs-on: ubuntu-latest if: ${{ github.event.inputs.downloadPublicVersion == '' && github.event.inputs.downloadPreviousRun == '' }} strategy: fail-fast: false - matrix: - stl: ["c++", "gnustl"] steps: - name: fetch SDK uses: actions/checkout@v2.3.1 @@ -261,18 +259,18 @@ jobs: id: cache_ndk uses: actions/cache@v2 with: - path: /tmp/android-ndk-r16b - key: android-ndk-${{ matrix.os }}-r16b + path: /tmp/android-ndk-r21e + key: android-ndk-${{ runner.os }}-r21e - name: install prerequisites run: sdk-src/build_scripts/android/install_prereqs.sh - name: build sdk run: | - sdk-src/build_scripts/android/build.sh firebase-cpp-sdk-android-${{ matrix.stl }}-build sdk-src ${{ matrix.stl }} - sdk-src/build_scripts/android/package.sh firebase-cpp-sdk-android-${{ matrix.stl }}-build firebase-cpp-sdk-android-${{ matrix.stl }}-package ${{ matrix.stl }} - cd firebase-cpp-sdk-android-${{ matrix.stl }}-package - tar -czhf ../firebase-cpp-sdk-android-${{ matrix.stl}}-package.tgz . + sdk-src/build_scripts/android/build.sh firebase-cpp-sdk-android-build sdk-src + sdk-src/build_scripts/android/package.sh firebase-cpp-sdk-android-build firebase-cpp-sdk-android-package + cd firebase-cpp-sdk-android-package + tar -czhf ../firebase-cpp-sdk-android-package.tgz . - name: Print built libraries shell: bash @@ -292,8 +290,8 @@ jobs: - name: upload artifacts uses: actions/upload-artifact@v2.2.2 with: - name: firebase-cpp-sdk-android-${{ matrix.stl }}-package - path: firebase-cpp-sdk-android-${{ matrix.stl }}-package.tgz + name: firebase-cpp-sdk-android-package + path: firebase-cpp-sdk-android-package.tgz build_desktop: name: build-${{ matrix.sdk_platform }}-${{ matrix.architecture }}-${{ matrix.build_type }}-${{ matrix.msvc_runtime }}-${{ matrix.linux_abi }} diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 32cbe45d42..75991e4700 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -433,8 +433,8 @@ jobs: id: cache_ndk uses: actions/cache@v2 with: - path: /tmp/android-ndk-r16b - key: android-ndk-${{ matrix.os }}-r16b + path: /tmp/android-ndk-r21e + key: android-ndk-${{ matrix.os }}-r21e - name: Setup python uses: actions/setup-python@v2 with: diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d3410f251..cb610fdc90 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,11 +81,6 @@ option(FIREBASE_GITHUB_ACTION_BUILD option(FIREBASE_QUICK_TEST "Enable quick tests will skip tests which requires access to the SECRET" OFF) -set(FIREBASE_ANDROID_STL "" CACHE STRING "STL implementation to use.") -if (NOT FIREBASE_ANDROID_STL STREQUAL "") - set(ANDROID_STL ${FIREBASE_ANDROID_STL}) -endif() - set(FIREBASE_PYTHON_EXECUTABLE "python" CACHE FILEPATH "The Python interpreter to use, such as one from a venv") diff --git a/admob/build.gradle b/admob/build.gradle index 6b54fd5f33..f1b5a00c52 100644 --- a/admob/build.gradle +++ b/admob/build.gradle @@ -30,11 +30,6 @@ allprojects { apply plugin: 'com.android.library' -ext { - firebaseAndroidStl = System.getenv('FIREBASE_ANDROID_STL') - firebaseAndroidStl = firebaseAndroidStl != null ? firebaseAndroidStl : '' -} - android { compileSdkVersion 28 buildToolsVersion '28.0.3' @@ -71,8 +66,7 @@ android { // Only include needed project. arguments '-DFIREBASE_CPP_USE_PRIOR_GRADLE_BUILD=ON', '-DFIREBASE_INCLUDE_LIBRARY_DEFAULT=OFF', - '-DFIREBASE_INCLUDE_ADMOB=ON', - "-DFIREBASE_ANDROID_STL=${firebaseAndroidStl}" + '-DFIREBASE_INCLUDE_ADMOB=ON' } } } diff --git a/analytics/build.gradle b/analytics/build.gradle index 9395803986..b10304768b 100644 --- a/analytics/build.gradle +++ b/analytics/build.gradle @@ -30,11 +30,6 @@ allprojects { apply plugin: 'com.android.library' -ext { - firebaseAndroidStl = System.getenv('FIREBASE_ANDROID_STL') - firebaseAndroidStl = firebaseAndroidStl != null ? firebaseAndroidStl : '' -} - android { compileSdkVersion 28 buildToolsVersion '28.0.3' @@ -71,8 +66,7 @@ android { // Only include needed project. arguments '-DFIREBASE_CPP_USE_PRIOR_GRADLE_BUILD=ON', '-DFIREBASE_INCLUDE_LIBRARY_DEFAULT=OFF', - '-DFIREBASE_INCLUDE_ANALYTICS=ON', - "-DFIREBASE_ANDROID_STL=${firebaseAndroidStl}" + '-DFIREBASE_INCLUDE_ANALYTICS=ON' } } } diff --git a/app/build.gradle b/app/build.gradle index 9ed5f73643..89edc14b32 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -30,11 +30,6 @@ allprojects { apply plugin: 'com.android.library' -ext { - firebaseAndroidStl = System.getenv('FIREBASE_ANDROID_STL') - firebaseAndroidStl = firebaseAndroidStl != null ? firebaseAndroidStl : '' -} - android { compileSdkVersion 28 buildToolsVersion '28.0.3' @@ -67,8 +62,7 @@ android { cmake { targets 'firebase_app' // Don't configure all the cmake subprojects. - arguments '-DFIREBASE_INCLUDE_LIBRARY_DEFAULT=OFF', - "-DFIREBASE_ANDROID_STL=${firebaseAndroidStl}" + arguments '-DFIREBASE_INCLUDE_LIBRARY_DEFAULT=OFF' } } } diff --git a/app/src/include/firebase/app.h b/app/src/include/firebase/app.h index 1758703391..6b81bc42ed 100644 --- a/app/src/include/firebase/app.h +++ b/app/src/include/firebase/app.h @@ -50,11 +50,6 @@ namespace internal { class AppInternal; } // namespace internal -#if FIREBASE_PLATFORM_ANDROID && defined(__GLIBCXX__) -#warning \ - "Firebase support for gnustl is deprecated and will be removed in the next major release. Please use libc++ instead." -#endif - /// @brief Reports whether a Firebase module initialized successfully. enum InitResult { /// The given library was successfully initialized. diff --git a/auth/build.gradle b/auth/build.gradle index 831c181747..1874f97383 100644 --- a/auth/build.gradle +++ b/auth/build.gradle @@ -30,11 +30,6 @@ allprojects { apply plugin: 'com.android.library' -ext { - firebaseAndroidStl = System.getenv('FIREBASE_ANDROID_STL') - firebaseAndroidStl = firebaseAndroidStl != null ? firebaseAndroidStl : '' -} - android { compileSdkVersion 28 buildToolsVersion '28.0.3' @@ -71,8 +66,7 @@ android { // Only include needed project. arguments '-DFIREBASE_CPP_USE_PRIOR_GRADLE_BUILD=ON', '-DFIREBASE_INCLUDE_LIBRARY_DEFAULT=OFF', - '-DFIREBASE_INCLUDE_AUTH=ON', - "-DFIREBASE_ANDROID_STL=${firebaseAndroidStl}" + '-DFIREBASE_INCLUDE_AUTH=ON' } } } diff --git a/build_scripts/android/build.sh b/build_scripts/android/build.sh index f2373e3ea9..16e4d456ab 100755 --- a/build_scripts/android/build.sh +++ b/build_scripts/android/build.sh @@ -4,10 +4,9 @@ buildpath=$1 sourcepath=$2 -stl=$3 if [[ -z "${buildpath}" || -z "${sourcepath}" ]]; then - echo "Usage: $0 [c++|gnustl]" + echo "Usage: $0 [c++]" exit 1 fi @@ -16,14 +15,6 @@ if [[ ! -d "${sourcepath}" ]]; then exit 2 fi -if [[ "${stl}" == "c++" || "${stl}" == "gnustl" ]]; then - export FIREBASE_ANDROID_STL="${stl}"_static -elif [[ ! -z "${stl}" ]]; then - echo "Invalid STL specified." - echo "Valid STLs are: 'c++' (default) or 'gnustl'" - exit 2 -fi - origpath=$( pwd -P ) mkdir -p "${buildpath}" @@ -36,21 +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}" || ! $(grep -q "Pkg\.Revision = 16\." "${NDK_ROOT}/source.properties") ]]; then - if [[ ! -d /tmp/android-ndk-r16b ]]; then - echo "Recommended NDK version r16b not present in /tmp." - if [[ ! -z "${stl}" ]]; then - echo "STL may only be specified if using the recommended NDK version." - echo "Please run install_prereqs.sh script and try again." - exit 2 - else - echo "Please run install_prereqs.sh if you wish to use the recommended NDK version." - echo "Continuing with default NDK..." - sleep 2 - fi +if [[ -z "${NDK_ROOT}" || ! $(grep -q "Pkg\.Revision = 21\." "${NDK_ROOT}/source.properties") ]]; then + if [[ ! -d /tmp/android-ndk-r21e ]]; then + echo "Recommended NDK version r21e 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-r16b - export ANDROID_NDK_HOME=/tmp/android-ndk-r16b + export NDK_ROOT=/tmp/android-ndk-r21e + export ANDROID_NDK_HOME=/tmp/android-ndk-r21e fi cd "${sourcepath}" set +e @@ -72,16 +57,16 @@ set -e declare -a paths for lib in *; do if [[ -d "${lib}/build" ]]; then - paths+=("${lib}/build") + paths+=("${lib}/build") fi if [[ -d "${lib}/.externalNativeBuild" ]]; then - paths+=("${lib}/.externalNativeBuild") + paths+=("${lib}/.externalNativeBuild") fi if [[ -d "${lib}/${lib}_resources/build" ]]; then - paths+=("${lib}/${lib}_resources/build") + paths+=("${lib}/${lib}_resources/build") fi if [[ -d "${lib}/${lib}_java/build" ]]; then - paths+=("${lib}/${lib}_java/build") + paths+=("${lib}/${lib}_java/build") fi done set -x diff --git a/build_scripts/android/install_prereqs.sh b/build_scripts/android/install_prereqs.sh index ffc601da2d..6bb0f19d7e 100755 --- a/build_scripts/android/install_prereqs.sh +++ b/build_scripts/android/install_prereqs.sh @@ -21,11 +21,11 @@ else # Retry up to 10 times because Curl has a tendency to timeout on # Github runners. for retry in {1..10} error; do - if [[ $retry == "error" ]]; then exit 5; fi - curl -LSs \ + if [[ $retry == "error" ]]; then exit 5; fi + curl -LSs \ "https://download.sysinternals.com/files/Strings.zip" \ --output Strings.zip && break - sleep 300 + sleep 300 done set -e unzip -q Strings.zip && rm -f Strings.zip @@ -60,29 +60,29 @@ if [[ -z "${ANDROID_HOME}" ]]; then exit 1 fi -if [[ -z "${NDK_ROOT}" || -z $(grep "Pkg\.Revision = 16\." "${NDK_ROOT}/source.properties") ]]; then - if [[ -d /tmp/android-ndk-r16b && \ - -n $(grep "Pkg\.Revision = 16\." "/tmp/android-ndk-r16b/source.properties") ]]; then - echo "Using NDK r16b in /tmp/android-ndk-r16b". +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". else echo "NDK_ROOT environment variable is not set, or NDK version is incorrect." - echo "This build requires NDK r16b for STLPort compatibility, downloading..." - if [[ -z $(which curl) ]]; then - echo "Error, could not run 'curl' to download NDK. Is it in your PATH?" - exit 1 - fi - set +e - # Retry up to 10 times because Curl has a tendency to timeout on - # Github runners. - 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-r16b-${platform}-x86_64.zip" \ - --output /tmp/android-ndk-r16b.zip && break - sleep 300 - done - set -e - (cd /tmp && unzip -oq android-ndk-r16b.zip && rm -f android-ndk-r16b.zip) - echo "NDK r16b has been downloaded into /tmp/android-ndk-r16b" + echo "This build recommends NDK r21e, downloading..." + if [[ -z $(which curl) ]]; then + echo "Error, could not run 'curl' to download NDK. Is it in your PATH?" + exit 1 + fi + set +e + # Retry up to 10 times because Curl has a tendency to timeout on + # Github runners. + 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 + 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" fi fi diff --git a/build_scripts/android/package.sh b/build_scripts/android/package.sh index 220e6181ed..553b9aca56 100755 --- a/build_scripts/android/package.sh +++ b/build_scripts/android/package.sh @@ -2,22 +2,14 @@ # Copyright 2020 Google LLC -readonly -a allowed_stl_variants=("c++" "gnustl") builtpath=$1 packagepath=$2 -stl=$3 -if [[ -z "${builtpath}" || -z "${packagepath}" || -z "${stl}" ]]; then - echo "Usage: $0 " - echo "STL variant is one of: ${allowed_stl_variants[*]}" +if [[ -z "${builtpath}" || -z "${packagepath}" ]]; then + echo "Usage: $0 " exit 1 fi -if [[ ! " ${allowed_stl_variants[@]} " =~ " ${stl} " ]]; then - echo "Invalid STL variant '${stl}'. Allowed STL variants: ${allowed_stl_variants[*]}" - exit 2 -fi - if [[ ! -d "${builtpath}/app/build" ]]; then echo "Built Android SDK not found at path '${builtpath}'." exit 2 @@ -38,7 +30,7 @@ cd "${origpath}" mkdir -p "${destpath}/libs/android" -# Copy each platform's libraries to the destination directory for this STL variant. +# Copy each platform's libraries to the destination directory. cd "${sourcepath}" # Make sure we only copy the libraries in product_list (specified in packaging.conf) for product in ${product_list[*]}; do @@ -49,7 +41,7 @@ for product in ${product_list[*]}; do for cpudir in "${dir}"/*; do cpu=$(basename ${cpudir}) libsrc="${sourcepath}/${cpudir}/libfirebase_${product}.a" - libdest="${destpath}/libs/android/${cpu}/${stl}" + libdest="${destpath}/libs/android/${cpu}" mkdir -p "${libdest}" cp -f "${libsrc}" "${libdest}/" done diff --git a/build_scripts/desktop/get_variant.sh b/build_scripts/desktop/get_variant.sh index 981dbffaf3..16db1f6a75 100755 --- a/build_scripts/desktop/get_variant.sh +++ b/build_scripts/desktop/get_variant.sh @@ -124,9 +124,6 @@ for c in $(echo "${filename}" | tr "[:upper:]" "[:lower:]" | tr "_.-" "\n\n\n"); c++) stl=c++ ;; - gnustl) - stl=gnustl - ;; cxx11) linux_abi=cxx11 ;; @@ -187,9 +184,9 @@ case ${os} in ;; android) if [[ -z "${arch}" ]]; then - echo -n "${stl}" + echo -n "." else - echo -n "${arch}/${stl}" + echo -n "${arch}" fi ;; *) diff --git a/database/build.gradle b/database/build.gradle index 8739434d0f..bafe7785db 100644 --- a/database/build.gradle +++ b/database/build.gradle @@ -30,11 +30,6 @@ allprojects { apply plugin: 'com.android.library' -ext { - firebaseAndroidStl = System.getenv('FIREBASE_ANDROID_STL') - firebaseAndroidStl = firebaseAndroidStl != null ? firebaseAndroidStl : '' -} - android { compileSdkVersion 28 buildToolsVersion '28.0.3' @@ -71,8 +66,7 @@ android { // Only include needed project. arguments '-DFIREBASE_CPP_USE_PRIOR_GRADLE_BUILD=ON', '-DFIREBASE_INCLUDE_LIBRARY_DEFAULT=OFF', - '-DFIREBASE_INCLUDE_DATABASE=ON', - "-DFIREBASE_ANDROID_STL=${firebaseAndroidStl}" + '-DFIREBASE_INCLUDE_DATABASE=ON' } } } diff --git a/dynamic_links/build.gradle b/dynamic_links/build.gradle index 1db97b2d96..570514f91d 100644 --- a/dynamic_links/build.gradle +++ b/dynamic_links/build.gradle @@ -30,11 +30,6 @@ allprojects { apply plugin: 'com.android.library' -ext { - firebaseAndroidStl = System.getenv('FIREBASE_ANDROID_STL') - firebaseAndroidStl = firebaseAndroidStl != null ? firebaseAndroidStl : '' -} - android { compileSdkVersion 28 buildToolsVersion '28.0.3' @@ -71,8 +66,7 @@ android { // Only include needed project. arguments '-DFIREBASE_CPP_USE_PRIOR_GRADLE_BUILD=ON', '-DFIREBASE_INCLUDE_LIBRARY_DEFAULT=OFF', - '-DFIREBASE_INCLUDE_DYNAMIC_LINKS=ON', - "-DFIREBASE_ANDROID_STL=${firebaseAndroidStl}" + '-DFIREBASE_INCLUDE_DYNAMIC_LINKS=ON' } } } diff --git a/firestore/build.gradle b/firestore/build.gradle index 13b22de7c8..a06792599a 100644 --- a/firestore/build.gradle +++ b/firestore/build.gradle @@ -30,11 +30,6 @@ allprojects { apply plugin: 'com.android.library' -ext { - firebaseAndroidStl = System.getenv('FIREBASE_ANDROID_STL') - firebaseAndroidStl = firebaseAndroidStl != null ? firebaseAndroidStl : '' -} - android { compileSdkVersion 28 buildToolsVersion '28.0.3' @@ -72,8 +67,7 @@ android { // Only include needed project. arguments '-DFIREBASE_CPP_USE_PRIOR_GRADLE_BUILD=ON', '-DFIREBASE_INCLUDE_LIBRARY_DEFAULT=OFF', - '-DFIREBASE_INCLUDE_FIRESTORE=ON', - "-DFIREBASE_ANDROID_STL=${firebaseAndroidStl}" + '-DFIREBASE_INCLUDE_FIRESTORE=ON' } } } diff --git a/functions/build.gradle b/functions/build.gradle index c350b092f1..0376db0837 100644 --- a/functions/build.gradle +++ b/functions/build.gradle @@ -30,11 +30,6 @@ allprojects { apply plugin: 'com.android.library' -ext { - firebaseAndroidStl = System.getenv('FIREBASE_ANDROID_STL') - firebaseAndroidStl = firebaseAndroidStl != null ? firebaseAndroidStl : '' -} - android { compileSdkVersion 28 buildToolsVersion '28.0.3' @@ -71,8 +66,7 @@ android { // Only include needed project. arguments '-DFIREBASE_CPP_USE_PRIOR_GRADLE_BUILD=ON', '-DFIREBASE_INCLUDE_LIBRARY_DEFAULT=OFF', - '-DFIREBASE_INCLUDE_FUNCTIONS=ON', - "-DFIREBASE_ANDROID_STL=${firebaseAndroidStl}" + '-DFIREBASE_INCLUDE_FUNCTIONS=ON' } } } diff --git a/installations/build.gradle b/installations/build.gradle index 783689c6d4..123c87465a 100644 --- a/installations/build.gradle +++ b/installations/build.gradle @@ -30,11 +30,6 @@ allprojects { apply plugin: 'com.android.library' -ext { - firebaseAndroidStl = System.getenv('FIREBASE_ANDROID_STL') - firebaseAndroidStl = firebaseAndroidStl != null ? firebaseAndroidStl : '' -} - android { compileSdkVersion 28 buildToolsVersion '28.0.3' @@ -71,8 +66,7 @@ android { // Only include needed project. arguments '-DFIREBASE_CPP_USE_PRIOR_GRADLE_BUILD=ON', '-DFIREBASE_INCLUDE_LIBRARY_DEFAULT=OFF', - '-DFIREBASE_INCLUDE_INSTALLATIONS=ON', - "-DFIREBASE_ANDROID_STL=${firebaseAndroidStl}" + '-DFIREBASE_INCLUDE_INSTALLATIONS=ON' } } } diff --git a/messaging/build.gradle b/messaging/build.gradle index e6399fc77a..238265ca37 100644 --- a/messaging/build.gradle +++ b/messaging/build.gradle @@ -30,11 +30,6 @@ allprojects { apply plugin: 'com.android.library' -ext { - firebaseAndroidStl = System.getenv('FIREBASE_ANDROID_STL') - firebaseAndroidStl = firebaseAndroidStl != null ? firebaseAndroidStl : '' -} - android { compileSdkVersion 28 buildToolsVersion '28.0.3' @@ -71,8 +66,7 @@ android { // Only include needed project. arguments '-DFIREBASE_CPP_USE_PRIOR_GRADLE_BUILD=ON', '-DFIREBASE_INCLUDE_LIBRARY_DEFAULT=OFF', - '-DFIREBASE_INCLUDE_MESSAGING=ON', - "-DFIREBASE_ANDROID_STL=${firebaseAndroidStl}" + '-DFIREBASE_INCLUDE_MESSAGING=ON' } } } diff --git a/release_build_files/CMakeLists.txt b/release_build_files/CMakeLists.txt index 239acca6ea..fae75b12e8 100644 --- a/release_build_files/CMakeLists.txt +++ b/release_build_files/CMakeLists.txt @@ -24,10 +24,8 @@ endif () # Determine the location of the libraries to use based on the platform. if(ANDROID) - string(REPLACE "_" ";" SPLIT_STL ${ANDROID_STL}) - list(GET SPLIT_STL 0 STL_DIR) set(FIREBASE_SDK_LIBDIR - "${FIREBASE_CPP_SDK_DIR}/libs/android/${ANDROID_ABI}/${STL_DIR}") + "${FIREBASE_CPP_SDK_DIR}/libs/android/${ANDROID_ABI}") elseif(APPLE) if(IOS) set(FIREBASE_SDK_LIBDIR ${FIREBASE_CPP_SDK_DIR}/libs/ios/universal) diff --git a/release_build_files/readme.md b/release_build_files/readme.md index f167b6c9e7..df49e73326 100644 --- a/release_build_files/readme.md +++ b/release_build_files/readme.md @@ -50,12 +50,9 @@ libs/ios/ARCH | iOS static libraries (compiled against | | libc++) | | Multi-architecture libraries are | | provided in the *universal* directory. -libs/android/ARCH/STL | Android (GCC 4.8+ compatible) static -| | libraries for each architecture and STL -| | variant. -| | _STL variants available:_ -| | * `c++`: LLVM libc++ runtime (recommended) -| | * `gnustl`: GNU STL (deprecated) +libs/android/ARCH | Android (GCC 4.8+ compatible) static +| | libraries for each architecture. Only the +| | LLVM libc++ STL runtime ("c++") is supported. | | More information can be found in the | | [NDK C++ Helper Runtimes](https://developer.android.com/ndk/guides/cpp-support.html#runtimes) | | documentation. @@ -567,8 +564,13 @@ workflow use only during the development of your app, not for publicly shipping code. ## Release Notes -### Upcoming release +### 9.0.0 - Changes + - General (Android): On Android, Firebase C++ is now built against NDK + version r21e. + - General (Android): Firebase support for gnustl (also known as libstdc++) + has been removed. Please use libc++ instead. Android libraries have been + moved from libs/android/ARCH/STL to libs/android/ARCH. - Storage (Desktop): Set Content-Type HTTP header when uploading with custom metadata. diff --git a/remote_config/build.gradle b/remote_config/build.gradle index 28f582eff4..35c1790010 100644 --- a/remote_config/build.gradle +++ b/remote_config/build.gradle @@ -30,11 +30,6 @@ allprojects { apply plugin: 'com.android.library' -ext { - firebaseAndroidStl = System.getenv('FIREBASE_ANDROID_STL') - firebaseAndroidStl = firebaseAndroidStl != null ? firebaseAndroidStl : '' -} - android { compileSdkVersion 28 buildToolsVersion '28.0.3' @@ -71,8 +66,7 @@ android { // Only include needed project. arguments '-DFIREBASE_CPP_USE_PRIOR_GRADLE_BUILD=ON', '-DFIREBASE_INCLUDE_LIBRARY_DEFAULT=OFF', - '-DFIREBASE_INCLUDE_REMOTE_CONFIG=ON', - "-DFIREBASE_ANDROID_STL=${firebaseAndroidStl}" + '-DFIREBASE_INCLUDE_REMOTE_CONFIG=ON' } } } diff --git a/storage/build.gradle b/storage/build.gradle index 2c2b6bc50a..0e3b9a0da7 100644 --- a/storage/build.gradle +++ b/storage/build.gradle @@ -30,11 +30,6 @@ allprojects { apply plugin: 'com.android.library' -ext { - firebaseAndroidStl = System.getenv('FIREBASE_ANDROID_STL') - firebaseAndroidStl = firebaseAndroidStl != null ? firebaseAndroidStl : '' -} - android { compileSdkVersion 28 buildToolsVersion '28.0.3' @@ -71,8 +66,7 @@ android { // Only include needed project. arguments '-DFIREBASE_CPP_USE_PRIOR_GRADLE_BUILD=ON', '-DFIREBASE_INCLUDE_LIBRARY_DEFAULT=OFF', - '-DFIREBASE_INCLUDE_STORAGE=ON', - "-DFIREBASE_ANDROID_STL=${firebaseAndroidStl}" + '-DFIREBASE_INCLUDE_STORAGE=ON' } } }