Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ Thumbs.db
# Temp files
temp/
/*.zip
*.uid
rc.json
37 changes: 36 additions & 1 deletion addons/godotx_firebase/export_plugin.gd
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,41 @@ class AndroidExportPlugin extends EditorExportPlugin:

out_file.store_buffer(content)
out_file.close()
print("[Firebase] ✓ Copied google-services.json → " + dest_res_path)

print("[Firebase] Copied Android config to " + dest_res_path)
# Patch Gradle files to declare and apply the Crashlytics Gradle plugin.
# The plugin is required at build time to inject a build UUID into the APK.
# Without it the app crashes on launch when Crashlytics is enabled.
if get_option("firebase/enable_crashlytics"):
_patch_gradle_file(
"res://android/build/settings.gradle",
"id 'com.google.gms.google-services' version '4.4.2'",
"id 'com.google.gms.google-services' version '4.4.2'\n id 'com.google.firebase.crashlytics' version '3.0.3'",
"settings.gradle"
)
_patch_gradle_file(
"res://android/build/build.gradle",
"id 'com.google.gms.google-services'",
"id 'com.google.gms.google-services'\n id 'com.google.firebase.crashlytics'",
"build.gradle"
)


func _patch_gradle_file(res_path: String, needle: String, replacement: String, label: String) -> void:
if not FileAccess.file_exists(res_path):
push_warning("[Firebase] %s not found, skipping Crashlytics Gradle plugin injection" % label)
return
var f := FileAccess.open(res_path, FileAccess.READ)
var text := f.get_as_text()
f.close()
if "firebase.crashlytics" in text:
return
var patched := text.replace(needle, replacement)
if patched == text:
push_warning("[Firebase] Could not inject Crashlytics plugin into %s — pattern not found" % label)
return
var out := FileAccess.open(res_path, FileAccess.WRITE)
out.store_string(patched)
out.close()
print("[Firebase] ✓ Injected Crashlytics Gradle plugin into %s" % label)

2 changes: 1 addition & 1 deletion android/.build_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.5.1.stable
4.6.1.stable
35 changes: 24 additions & 11 deletions export_presets.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@
name="iOS"
platform="iOS"
runnable=true
advanced_options=false
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=".godot/*,android/*,ios/*,build/*,temp/*,godot/*,godot-cpp/*,extras/*,*.import"
export_path="build/ios/GodotxFirebaseSample.xcodeproj"
patches=PackedStringArray()
patch_delta_encoding=false
patch_delta_compression_level_zstd=19
patch_delta_min_reduction=0.1
patch_delta_include_filters="*"
patch_delta_exclude_filters=""
encryption_include_filters=""
encryption_exclude_filters=""
seed=0
Expand Down Expand Up @@ -38,6 +42,10 @@ application/additional_plist_content=""
application/icon_interpolation=4
application/export_project_only=true
application/delete_old_export_files_unconditionally=false
plugins/GodotxFirebaseCrashlytics=true
plugins/GodotxFirebaseMessaging=true
plugins/GodotxFirebaseCore=true
plugins/GodotxFirebaseAnalytics=true
entitlements/increased_memory_limit=false
entitlements/game_center=false
entitlements/push_notifications="Development"
Expand Down Expand Up @@ -146,10 +154,10 @@ privacy/collected_data/browsing_history/collected=false
privacy/collected_data/browsing_history/linked_to_user=false
privacy/collected_data/browsing_history/used_for_tracking=false
privacy/collected_data/browsing_history/collection_purposes=0
privacy/collected_data/search_hhistory/collected=false
privacy/collected_data/search_hhistory/linked_to_user=false
privacy/collected_data/search_hhistory/used_for_tracking=false
privacy/collected_data/search_hhistory/collection_purposes=0
privacy/collected_data/search_history/collected=false
privacy/collected_data/search_history/linked_to_user=false
privacy/collected_data/search_history/used_for_tracking=false
privacy/collected_data/search_history/collection_purposes=0
privacy/collected_data/user_id/collected=false
privacy/collected_data/user_id/linked_to_user=false
privacy/collected_data/user_id/used_for_tracking=false
Expand Down Expand Up @@ -260,10 +268,10 @@ storyboard/custom_image@2x=""
storyboard/custom_image@3x=""
storyboard/use_custom_bg_color=false
storyboard/custom_bg_color=Color(0, 0, 0, 1)
plugins/GodotxFirebaseCrashlytics=true
plugins/GodotxFirebaseMessaging=true
plugins/GodotxFirebaseCore=true
plugins/GodotxFirebaseAnalytics=true
privacy/collected_data/search_hhistory/collected=false
privacy/collected_data/search_hhistory/linked_to_user=false
privacy/collected_data/search_hhistory/used_for_tracking=false
privacy/collected_data/search_hhistory/collection_purposes=0
plugins/GodotxFirebase=true
plugins/FirebaseBridge=true
firebase/ios_config_file="res://temp/GoogleService-Info.plist"
Expand All @@ -277,14 +285,18 @@ firebase/enable_core=true
name="Android"
platform="Android"
runnable=true
advanced_options=false
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=".godot/*,android/*,ios/*,build/*,temp/*,godot/*,godot-cpp/*,extras/*,*.import"
export_path="build/android/GodotxFirebaseSample.apk"
patches=PackedStringArray()
patch_delta_encoding=false
patch_delta_compression_level_zstd=19
patch_delta_min_reduction=0.1
patch_delta_include_filters="*"
patch_delta_exclude_filters=""
encryption_include_filters=""
encryption_exclude_filters=""
seed=0
Expand All @@ -309,7 +321,7 @@ architectures/arm64-v8a=true
architectures/x86=false
architectures/x86_64=false
version/code=1
version/name="1.0.0"
version/name="4.6.1"
package/unique_name="com.godotx.firebase"
package/name=""
package/signed=true
Expand Down Expand Up @@ -414,6 +426,7 @@ permissions/manage_accounts=false
permissions/manage_app_tokens=false
permissions/manage_documents=false
permissions/manage_external_storage=false
permissions/manage_media=false
permissions/master_clear=false
permissions/media_content_control=false
permissions/modify_audio_settings=false
Expand Down
Loading