Add support for exporting to Google Play Instant

This commit is contained in:
kojurohan42
2025-05-23 22:00:14 +05:45
parent 4a44078451
commit 12ad9ed4e0
5 changed files with 50 additions and 3 deletions

View File

@@ -315,6 +315,8 @@ String _get_application_tag(const Ref<EditorExportPlatform> &p_export_platform,
int app_category_index = (int)(p_preset->get("package/app_category"));
bool is_game = app_category_index == APP_CATEGORY_GAME;
bool google_play_instant_build = (bool)p_preset->get("gradle_build/google_play_instant");
String manifest_application_text = vformat(
" <application android:label=\"@string/godot_project_name_string\"\n"
" android:allowBackup=\"%s\"\n"
@@ -335,6 +337,10 @@ String _get_application_tag(const Ref<EditorExportPlatform> &p_export_platform,
}
manifest_application_text += " tools:ignore=\"GoogleAppIndexingWarning\">\n\n";
if (google_play_instant_build) {
manifest_application_text += " <dist:module dist:instant=\"true\" />\n";
}
for (int i = 0; i < p_metadata.size(); i++) {
manifest_application_text += vformat(" <meta-data tools:node=\"replace\" android:name=\"%s\" android:value=\"%s\" />\n", p_metadata[i].name, p_metadata[i].value);
}