Skip to content

Commit e88046e

Browse files
authored
Fix Crashlytics proguard file generation (#289)
* Fix Crashlytics proguard file generation * Update readme.md
1 parent a946883 commit e88046e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

crashlytics/src/cpp/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,18 @@ if(ANDROID)
7272
set(FIREBASE_CPP_CRASHLYTICS_PROGUARD ${CMAKE_CURRENT_BINARY_DIR}/crashlytics.pro
7373
CACHE FILEPATH "Proguard file for Crashlytics" FORCE)
7474

75+
# The Crashlytics NDK symbols aren't properly caught by the usual strings logic,
76+
# so we explicitly append it at the end.
7577
add_custom_command(
7678
OUTPUT ${FIREBASE_CPP_CRASHLYTICS_PROGUARD}
7779
COMMAND strings $<TARGET_FILE:firebase_crashlytics> |
7880
grep %PG% |
7981
sed -r 'sI/I.Ig' |
80-
sed -r 's/%PG%/-keep,includedescriptorclasses public class /g'
81-
> ${FIREBASE_CPP_CRASHLYTICS_PROGUARD}
82+
sed -r 's/%PG%/-keep,includedescriptorclasses public class /g' |
83+
sed -r 'sI\$\$I { *\; }Ig'
84+
> ${FIREBASE_CPP_CRASHLYTICS_PROGUARD} &&
85+
echo '-keep class com.google.firebase.crashlytics.ndk.** { *\; }'
86+
>> ${FIREBASE_CPP_CRASHLYTICS_PROGUARD}
8287
DEPENDS firebase_crashlytics
8388
COMMENT "Generating Crashlytics Proguard file."
8489
)

docs/readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ Release Notes
161161
- General (Editor, macOS): Add support for Apple Silicon chips.
162162
- General (iOS): Firebase Unity on iOS is now built using Xcode 13.3.1.
163163
- Analytics: Removed deprecated event names and parameters.
164+
- Crashlytics (Android): Fixed a bug with missing symbols when enabling
165+
minification via proguard.
164166
- Realtime Database (Desktop): Fixed a bug handling server timestamps
165167
on 32-bit CPUs.
166168
- Storage (Desktop): Set Content-Type HTTP header when uploading with

0 commit comments

Comments
 (0)