File tree Expand file tree Collapse file tree 4 files changed +26
-2
lines changed Expand file tree Collapse file tree 4 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ option(FIREBASE_INCLUDE_AUTH
41
41
${FIREBASE_INCLUDE_LIBRARY_DEFAULT} )
42
42
option (FIREBASE_INCLUDE_CRASHLYTICS
43
43
"Include the Firebase Crashlytics library."
44
- OFF )
44
+ ${FIREBASE_INCLUDE_LIBRARY_DEFAULT} )
45
45
option (FIREBASE_INCLUDE_DATABASE
46
46
"Include the Firebase Realtime Database library."
47
47
${FIREBASE_INCLUDE_LIBRARY_DEFAULT} )
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ mkdir -p android_build
80
80
pushd android_build
81
81
82
82
# Configure cmake with option value
83
- cmake .. ${CMAKE_OPTIONS}
83
+ cmake .. ${CMAKE_OPTIONS} " $@ "
84
84
check_exit_code $?
85
85
86
86
# Build the SDK
Original file line number Diff line number Diff line change 14
14
15
15
# CMake file for the firebase crashlytics library
16
16
17
+ include (build_shared )
18
+
17
19
# Only for unity builds
18
20
if (NOT FIREBASE_INCLUDE_UNITY )
19
21
return ()
Original file line number Diff line number Diff line change @@ -67,6 +67,28 @@ target_compile_definitions(firebase_crashlytics
67
67
-DINTERNAL_EXPERIMENTAL=1
68
68
)
69
69
70
+ # Generate the Proguard file
71
+ if (ANDROID )
72
+ set (FIREBASE_CPP_CRASHLYTICS_PROGUARD ${CMAKE_CURRENT_BINARY_DIR} /crashlytics.pro
73
+ CACHE FILEPATH "Proguard file for Crashlytics" FORCE )
74
+
75
+ add_custom_command (
76
+ OUTPUT ${FIREBASE_CPP_CRASHLYTICS_PROGUARD}
77
+ COMMAND strings $< TARGET_FILE:firebase_crashlytics> |
78
+ grep %PG% |
79
+ sed -r 'sI/I.Ig' |
80
+ sed -r 's/%PG%/-keep,includedescriptorclasses public class /g'
81
+ > ${FIREBASE_CPP_CRASHLYTICS_PROGUARD}
82
+ DEPENDS firebase_crashlytics
83
+ COMMENT "Generating Crashlytics Proguard file."
84
+ )
85
+
86
+ add_custom_target (
87
+ FIREBASE_CPP_CRASHLYTICS_PROGUARD
88
+ DEPENDS ${FIREBASE_CPP_CRASHLYTICS_PROGUARD}
89
+ )
90
+ endif ()
91
+
70
92
if (IOS )
71
93
# Enable Automatic Reference Counting (ARC).
72
94
set_property (
You can’t perform that action at this time.
0 commit comments