File tree Expand file tree Collapse file tree 9 files changed +70
-18
lines changed Expand file tree Collapse file tree 9 files changed +70
-18
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ set(FIREBASE_MESSAGING_ANDROID_DEPS
65
65
"com.google.firebase:firebase-messaging:23.1.2"
66
66
"com.google.firebase:firebase-analytics:21.2.0"
67
67
"com.google.firebase:firebase-iid:21.1.0"
68
+ "com.google.flatbuffers:flatbuffers-java:1.12.0"
68
69
)
69
70
70
71
set (FIREBASE_REMOTE_CONFIG_ANDROID_DEPS
Original file line number Diff line number Diff line change @@ -298,29 +298,40 @@ endfunction()
298
298
#
299
299
# unity_pack_file(<file>
300
300
# PACK_PATH
301
+ # RENAME_TO
301
302
# )
302
303
#
303
304
# Args:
304
305
# file: Path of file to pack
305
- # pack_path: Destination to put the file in.
306
+ # PACK_PATH: Destination to put the file in.
307
+ # RENAME_TO: Optional parameter to rename the file.
306
308
#
307
309
# Notes:
308
310
# * Files are put into build arch folder
309
311
#
310
312
function (unity_pack_file file )
311
- set (multi PACK_PATH )
312
- # Parse the arguments into UNITY_MONO_SOURCES and UNITY_MONO_DEPENDS .
313
- cmake_parse_arguments (UNITY_PACK "" "" " ${multi} " ${ARGN} )
313
+ set (single PACK_PATH RENAME_TO )
314
+ # Parse the arguments into UNITY_PACK_* .
315
+ cmake_parse_arguments (UNITY_PACK "" "${single} " " " ${ARGN} )
314
316
315
317
if ("${UNITY_PACK_PACK_PATH} " STREQUAL "" )
316
318
set (UNITY_PACK_PACK_PATH ${UNITY_PACK_DEFAULT_CS_PATH} )
317
319
endif ()
318
320
319
- # meta file
320
- install (
321
- FILES ${file}
322
- DESTINATION ${UNITY_PACK_PACK_PATH}
323
- )
321
+ # Install the file to the PACK_PATH, renaming it if given RENAME_TO
322
+ if ("${UNITY_PACK_RENAME_TO} " STREQUAL "" )
323
+ # Install the file to the PACK_PATH
324
+ install (
325
+ FILES ${file}
326
+ DESTINATION ${UNITY_PACK_PACK_PATH}
327
+ )
328
+ else ()
329
+ install (
330
+ FILES ${file}
331
+ DESTINATION ${UNITY_PACK_PACK_PATH}
332
+ RENAME ${UNITY_PACK_RENAME_TO}
333
+ )
334
+ endif ()
324
335
endfunction ()
325
336
326
337
# Packs a aar file into the unity zip
Original file line number Diff line number Diff line change @@ -69,6 +69,12 @@ Support
69
69
70
70
Release Notes
71
71
-------------
72
+ ### Upcoming
73
+ - Changes
74
+ - Messaging (Android): Provide the custom MessagingUnityPlayerActivity
75
+ as a Java file instead of precompiling it. This is to better support
76
+ changes with the UnityPlayerActivity in the Unity 2023 editor.
77
+
72
78
### 10.6.0
73
79
- Changes
74
80
- General (Android): Update to Firebase Android BoM version 31.2.3.
Original file line number Diff line number Diff line change @@ -71,8 +71,6 @@ build_firebase_shared(
71
71
FirebaseCppMessaging
72
72
ANDROID_MANIFEST
73
73
"${CMAKE_CURRENT_LIST_DIR} /AndroidManifest.xml"
74
- CLASSES_JAR
75
- "${CMAKE_CURRENT_LIST_DIR} /activity/classes.jar"
76
74
)
77
75
endif ()
78
76
@@ -89,6 +87,29 @@ if (FIREBASE_INCLUDE_UNITY)
89
87
)
90
88
endif ()
91
89
90
+ if (ANDROID )
91
+ # Add the additional Messaging files needed for Android
92
+ unity_pack_file (
93
+ "activity/com/google/firebase/MessagingUnityPlayerActivity.java"
94
+ PACK_PATH
95
+ "Firebase/Plugins/Android/"
96
+ )
97
+ # Get the Messaging Java AAR file from the C++ SDK.
98
+ add_custom_target (
99
+ firebase_messaging_java_aar_unity
100
+ ALL
101
+ DEPENDS firebase_messaging_java_aar
102
+ )
103
+ get_target_property (messaging_aar_file firebase_messaging_java_aar OBJECT_OUTPUTS )
104
+ unity_pack_file (
105
+ ${messaging_aar_file}
106
+ PACK_PATH
107
+ "Firebase/Plugins/Android/"
108
+ RENAME_TO
109
+ "firebase-messaging-cpp.aar"
110
+ )
111
+ endif ()
112
+
92
113
set_property (TARGET firebase_messaging_cs
93
114
PROPERTY FOLDER
94
115
"Firebase ${FIREBASE_PLATFORM_NAME} "
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 296
296
" Firebase/Plugins/x86_64/FirebaseCppMessaging*"
297
297
]
298
298
},
299
+ {
300
+ "importer" : " PluginImporter" ,
301
+ "platforms" : [" Android" ],
302
+ "cpu" : " AnyCPU" ,
303
+ "paths" : [
304
+ " Firebase/Plugins/Android/MessagingUnityPlayerActivity.java" ,
305
+ " Firebase/Plugins/Android/firebase-messaging-cpp.aar"
306
+ ]
307
+ },
299
308
{
300
309
"importer" : " DefaultImporter" ,
301
310
"paths" : [
Original file line number Diff line number Diff line change 742
742
" Firebase/Plugins/x86_64/FirebaseCppMessaging*"
743
743
]
744
744
},
745
+ {
746
+ "importer" : " PluginImporter" ,
747
+ "platforms" : [" Android" ],
748
+ "cpu" : " AnyCPU" ,
749
+ "paths" : [
750
+ " Firebase/Plugins/Android/MessagingUnityPlayerActivity.java" ,
751
+ " Firebase/Plugins/Android/firebase-messaging-cpp.aar"
752
+ ]
753
+ },
745
754
{
746
755
"importer" : " DefaultImporter" ,
747
756
"paths" : [" Firebase/Editor/FirebaseMessaging*_manifest.txt" ]
Original file line number Diff line number Diff line change 437
437
"Firebase/Editor/FirebaseMessaging_version-10.4.0_manifest.txt": "b3485828d4234137a8280f00a1f7b9ee",
438
438
"Firebase/Editor/FirebaseRemoteConfig_version-10.4.0_manifest.txt": "b2256be1dfd54952908252655336b218",
439
439
"Firebase/Editor/FirebaseStorage_version-10.4.0_manifest.txt": "981f0090257a44369332d6a7437869f3",
440
+ "Firebase/Plugins/Android/MessagingUnityPlayerActivity.java": "794c5e69320a44ca9d01f87f1019164e",
441
+ "Firebase/Plugins/Android/firebase-messaging-cpp.aar": "0be2cda49adc4b61a7e9eb9bf669fdab",
440
442
"Firebase/Plugins/x86_64/FirebaseCppApp-10_4_0.bundle": "377df3b93de5491f8ca5dd75a1c63285",
441
443
"Firebase/Plugins/x86_64/FirebaseCppApp-10_4_0.dll": "6008badfe2a9454c897af3b59668d865",
442
444
"Firebase/Plugins/x86_64/FirebaseCppApp-10_4_0.so": "e2c049b2b0a44e3cb32171ad383d7bb1",
You can’t perform that action at this time.
0 commit comments