Skip to content

Commit 399f740

Browse files
authored
Add a CMake target for the Messaging aar (#1205)
1 parent 7b3757d commit 399f740

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

messaging/CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,19 @@ endif()
109109

110110
if(ANDROID)
111111
firebase_cpp_proguard_file(messaging)
112+
113+
# Expose the Messaging Java AAR file as a target
114+
set(FIREBASE_MESSAGING_JAVA_AAR_PATH
115+
"${CMAKE_CURRENT_LIST_DIR}/messaging_java/build/outputs/aar/messaging_java.aar")
116+
firebase_cpp_gradle(":messaging:messaging_java:assemble"
117+
"${FIREBASE_MESSAGING_JAVA_AAR_PATH}"
118+
)
119+
add_custom_target(firebase_messaging_java_aar
120+
DEPENDS "${FIREBASE_MESSAGING_JAVA_AAR_PATH}"
121+
)
122+
set_target_properties(firebase_messaging_java_aar PROPERTIES
123+
OBJECT_OUTPUTS "${FIREBASE_MESSAGING_JAVA_AAR_PATH}"
124+
)
112125
elseif(IOS)
113126
# Enable Automatic Reference Counting (ARC) and Bitcode.
114127
target_compile_options(firebase_messaging

0 commit comments

Comments
 (0)