Skip to content

Commit

Permalink
Fix Android packaging script to use new paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonsimantov committed Sep 25, 2024
1 parent 602099a commit ccc28d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion android_build_files/generate_proguard.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def defineGenerateProguardFile(String subproject, String buildType,
String nativeBuildDir =
project.android.externalNativeBuild.cmake.buildStagingDirectory
if (nativeBuildDir == null || nativeBuildDir.isEmpty()) {
nativeBuildDir = file('.cxx/cmake').absolutePath
nativeBuildDir = file('.cxx').absolutePath
}

// Find the static library that was built. Note that there are multiple
Expand Down
10 changes: 6 additions & 4 deletions build_scripts/android/package.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/bin/bash -ex

# Copyright 2020 Google LLC

Expand Down Expand Up @@ -34,10 +34,12 @@ mkdir -p "${destpath}/libs/android"
cd "${sourcepath}"
# Make sure we only copy the libraries in product_list (specified in packaging.conf)
for product in ${product_list[*]}; do
if [[ ! -d "${product}/build/intermediates/cmake/release/obj" ]]; then
if [[ ! -d "${product}/build/intermediates/cxx" ]]; then
continue
fi
dir="${product}/build/intermediates/cmake/release/obj"
# Get the most recent matching intermediate files directory.
dir=$(ls -td "${product}"/build/intermediates/cxx/Rel*/*/obj | head -1)
echo "${dir}"
for cpudir in "${dir}"/*; do
cpu=$(basename ${cpudir})
libsrc="${sourcepath}/${cpudir}/libfirebase_${product}.a"
Expand All @@ -49,7 +51,7 @@ for product in ${product_list[*]}; do
cp -f "${sourcepath}/${product}/build/Release/${product}.pro" "${destpath}/libs/android/"
# Copy the special messaging aar file, but only if messaging was built.
if [[ "${product}" == "messaging" ]]; then
cp -f "${sourcepath}/messaging/messaging_java/build/outputs/aar/messaging_java"*.aar "${destpath}/libs/android/firebase_messaging_cpp.aar"
cp -f "${sourcepath}/messaging/messaging_java/build/outputs/aar/messaging_java-release"*.aar "${destpath}/libs/android/firebase_messaging_cpp.aar"
fi
done
cd "${origpath}"

0 comments on commit ccc28d1

Please sign in to comment.