Skip to content

Commit 82b522c

Browse files
authored
Merge branch 'am-gradle_update' into try-merging-gradle-7-change
2 parents 54dea84 + ccc28d1 commit 82b522c

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,23 +236,19 @@ if(FIREBASE_CPP_USE_PRIOR_GRADLE_BUILD)
236236
# In case there are multiple matches, take the one with the newest timestamp.
237237
set(newest_timestamp 0)
238238
foreach(possible_prev_build_dir IN LISTS possible_prev_build_dirs)
239-
message("CONSIDERING ${possible_prev_build_dir}")
240239
if(IS_DIRECTORY ${possible_prev_build_dir})
241240
if(EXISTS "${possible_prev_build_dir}/${header_to_scan_for}")
242241
# Check if it's newer than any other files.
243-
message("FOUND ${possible_prev_build_dir}/${header_to_scan_for}")
244242
file(TIMESTAMP "${possible_prev_build_dir}/${header_to_scan_for}" timestamp "%s")
245-
message("GOT TIMESTAMP: ${timestamp}")
246243
if(${timestamp} GREATER ${newest_timestamp})
247-
message("USING ${possible_prev_build_dir}")
248244
set(APP_BINARY_DIR ${possible_prev_build_dir})
249245
set(newest_timestamp ${timestamp})
250246
endif()
251247
endif()
252248
endif()
253249
endforeach()
254250
if (IS_DIRECTORY "${APP_BINARY_DIR}")
255-
message("Found previous Firebase App build in ${APP_BINARY_DIR}")
251+
message(STATUS "Found previous Firebase App build in ${APP_BINARY_DIR}")
256252
else()
257253
message(FATAL_ERROR "Could not find previous Firebase App build under ${prev_build_path}")
258254
endif()

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)