Skip to content

Commit ccc28d1

Browse files
committed
Fix Android packaging script to use new paths.
1 parent 602099a commit ccc28d1

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

android_build_files/generate_proguard.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def defineGenerateProguardFile(String subproject, String buildType,
7272
String nativeBuildDir =
7373
project.android.externalNativeBuild.cmake.buildStagingDirectory
7474
if (nativeBuildDir == null || nativeBuildDir.isEmpty()) {
75-
nativeBuildDir = file('.cxx/cmake').absolutePath
75+
nativeBuildDir = file('.cxx').absolutePath
7676
}
7777

7878
// Find the static library that was built. Note that there are multiple

build_scripts/android/package.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/bin/bash -ex
22

33
# Copyright 2020 Google LLC
44

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

0 commit comments

Comments
 (0)