Skip to content

Commit c528c58

Browse files
committed
Merge pull request #107525 from syntaxerror247/revert-play-instant
Revert "Add support for exporting to Google Play Instant"
2 parents c1785e9 + dcab8a7 commit c528c58

File tree

5 files changed

+3
-50
lines changed

5 files changed

+3
-50
lines changed

platform/android/doc_classes/EditorExportPlatformAndroid.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,6 @@
6161
<member name="gradle_build/export_format" type="int" setter="" getter="">
6262
Application export format (*.apk or *.aab).
6363
</member>
64-
<member name="gradle_build/google_play_instant" type="bool" setter="" getter="">
65-
If [code]true[/code], configures the exported project for Play Instant Build.
66-
Use this option when targeting Play Instant to allow users to launch the app without installation. See [url=https://developer.android.com/topic/google-play-instant/overview]Google Play Instant[/url].
67-
[b]Note:[/b] Instant play games also need to be optimized for size. See [url=https://docs.godotengine.org/en/stable/contributing/development/compiling/optimizing_for_size.html]Optimizing a build for size[/url].
68-
</member>
6964
<member name="gradle_build/gradle_build_directory" type="String" setter="" getter="">
7065
Path to the Gradle build directory. If left empty, then [code]res://android[/code] will be used.
7166
</member>

platform/android/export/export_plugin.cpp

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,6 @@ static const int EXPORT_FORMAT_AAB = 1;
280280

281281
static const char *APK_ASSETS_DIRECTORY = "assets";
282282
static const char *AAB_ASSETS_DIRECTORY = "assetPackInstallTime/src/main/assets";
283-
static const char *INSTANT_APP_ASSETS_DIRECTORY = "assets"; // instant build doesn't support installTime assetspacks, so using the same directory as APK
284283

285284
static const int DEFAULT_MIN_SDK_VERSION = 24; // Should match the value in 'platform/android/java/app/config.gradle#minSdk'
286285
static const int DEFAULT_TARGET_SDK_VERSION = 35; // Should match the value in 'platform/android/java/app/config.gradle#targetSdk'
@@ -525,12 +524,6 @@ String EditorExportPlatformAndroid::get_valid_basename(const Ref<EditorExportPre
525524

526525
String EditorExportPlatformAndroid::get_assets_directory(const Ref<EditorExportPreset> &p_preset, int p_export_format) const {
527526
String gradle_build_directory = ExportTemplateManager::get_android_build_directory(p_preset);
528-
529-
bool google_play_instant_build = p_preset->get("gradle_build/google_play_instant");
530-
if (google_play_instant_build) {
531-
return gradle_build_directory.path_join(INSTANT_APP_ASSETS_DIRECTORY); // Always use base APK asset format
532-
}
533-
534527
return gradle_build_directory.path_join(p_export_format == EXPORT_FORMAT_AAB ? AAB_ASSETS_DIRECTORY : APK_ASSETS_DIRECTORY);
535528
}
536529

@@ -1001,19 +994,10 @@ void EditorExportPlatformAndroid::_get_manifest_info(const Ref<EditorExportPrese
1001994

1002995
void EditorExportPlatformAndroid::_write_tmp_manifest(const Ref<EditorExportPreset> &p_preset, bool p_give_internet, bool p_debug) {
1003996
print_verbose("Building temporary manifest...");
1004-
1005-
bool google_play_instant_build = (bool)p_preset->get("gradle_build/google_play_instant");
1006-
1007997
String manifest_text =
1008998
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
1009999
"<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n"
1010-
" xmlns:tools=\"http://schemas.android.com/tools\"";
1011-
1012-
if (google_play_instant_build) {
1013-
manifest_text += " android:targetSandboxVersion=\"2\" \n xmlns:dist=\"http://schemas.android.com/apk/distribution\"";
1014-
}
1015-
1016-
manifest_text += ">\n";
1000+
" xmlns:tools=\"http://schemas.android.com/tools\">\n";
10171001

10181002
manifest_text += _get_screen_sizes_tag(p_preset);
10191003
manifest_text += _get_gles_tag();
@@ -1047,7 +1031,6 @@ void EditorExportPlatformAndroid::_write_tmp_manifest(const Ref<EditorExportPres
10471031
}
10481032

10491033
manifest_text += _get_application_tag(Ref<EditorExportPlatform>(this), p_preset, _has_read_write_storage_permission(perms), p_debug, manifest_metadata);
1050-
10511034
manifest_text += "</manifest>\n";
10521035
String manifest_path = ExportTemplateManager::get_android_build_directory(p_preset).path_join(vformat("src/%s/AndroidManifest.xml", (p_debug ? "debug" : "release")));
10531036

@@ -2036,12 +2019,6 @@ String EditorExportPlatformAndroid::get_export_option_warning(const EditorExport
20362019
if (int(p_preset->get("gradle_build/export_format")) == EXPORT_FORMAT_AAB && !gradle_build_enabled) {
20372020
return TTR("\"Export AAB\" is only valid when \"Use Gradle Build\" is enabled.");
20382021
}
2039-
} else if (p_name == "gradle_build/google_play_instant") {
2040-
bool instant_enabled = p_preset->get("gradle_build/google_play_instant");
2041-
bool gradle_build_enabled = p_preset->get("gradle_build/use_gradle_build");
2042-
if (instant_enabled && !gradle_build_enabled) {
2043-
return TTR("\"Instant Build\" is only valid when \"Use Gradle Build\" is enabled.");
2044-
}
20452022
} else if (p_name == "gradle_build/min_sdk") {
20462023
String min_sdk_str = p_preset->get("gradle_build/min_sdk");
20472024
bool gradle_build_enabled = p_preset->get("gradle_build/use_gradle_build");
@@ -2121,7 +2098,6 @@ void EditorExportPlatformAndroid::get_export_options(List<ExportOption> *r_optio
21212098
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "gradle_build/gradle_build_directory", PROPERTY_HINT_PLACEHOLDER_TEXT, "res://android"), "", false, false));
21222099
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "gradle_build/android_source_template", PROPERTY_HINT_GLOBAL_FILE, "*.zip"), ""));
21232100
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "gradle_build/export_format", PROPERTY_HINT_ENUM, "Export APK,Export AAB"), EXPORT_FORMAT_APK, false, true));
2124-
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "gradle_build/google_play_instant"), false, true, true));
21252101
// Using String instead of int to default to an empty string (no override) with placeholder for instructions (see GH-62465).
21262102
// This implies doing validation that the string is a proper int.
21272103
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "gradle_build/min_sdk", PROPERTY_HINT_PLACEHOLDER_TEXT, vformat("%d (default)", DEFAULT_MIN_SDK_VERSION)), "", false, true));
@@ -3606,7 +3582,6 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
36063582
String enabled_abi_string = join_abis(enabled_abis, "|", false);
36073583
String sign_flag = should_sign ? "true" : "false";
36083584
String zipalign_flag = "true";
3609-
String play_instant_flag = bool_to_string(p_preset->get("gradle_build/google_play_instant"));
36103585

36113586
Vector<String> android_libraries;
36123587
Vector<String> android_dependencies;
@@ -3681,7 +3656,6 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
36813656
cmdline.push_back("-Pplugins_maven_repos=" + combined_android_dependencies_maven_repos); // argument to specify the list of maven repos for android dependencies provided by plugins.
36823657
cmdline.push_back("-Pperform_zipalign=" + zipalign_flag); // argument to specify whether the build should be zipaligned.
36833658
cmdline.push_back("-Pperform_signing=" + sign_flag); // argument to specify whether the build should be signed.
3684-
cmdline.push_back("-Pplay_instant_app=" + play_instant_flag); // argument to specify whether the build is for Google Play Instant.
36853659

36863660
// NOTE: The release keystore is not included in the verbose logging
36873661
// to avoid accidentally leaking sensitive information when sharing verbose logs for troubleshooting.

platform/android/export/gradle_export_util.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,6 @@ String _get_application_tag(const Ref<EditorExportPlatform> &p_export_platform,
315315
int app_category_index = (int)(p_preset->get("package/app_category"));
316316
bool is_game = app_category_index == APP_CATEGORY_GAME;
317317

318-
bool google_play_instant_build = (bool)p_preset->get("gradle_build/google_play_instant");
319-
320318
String manifest_application_text = vformat(
321319
" <application android:label=\"@string/godot_project_name_string\"\n"
322320
" android:allowBackup=\"%s\"\n"
@@ -337,10 +335,6 @@ String _get_application_tag(const Ref<EditorExportPlatform> &p_export_platform,
337335
}
338336
manifest_application_text += " tools:ignore=\"GoogleAppIndexingWarning\">\n\n";
339337

340-
if (google_play_instant_build) {
341-
manifest_application_text += " <dist:module dist:instant=\"true\" />\n";
342-
}
343-
344338
for (int i = 0; i < p_metadata.size(); i++) {
345339
manifest_application_text += vformat(" <meta-data tools:node=\"replace\" android:name=\"%s\" android:value=\"%s\" />\n", p_metadata[i].name, p_metadata[i].value);
346340
}

platform/android/java/app/build.gradle

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ dependencies {
3737
implementation "androidx.fragment:fragment:$versions.fragmentVersion"
3838
implementation "androidx.core:core-splashscreen:$versions.splashscreenVersion"
3939

40-
if (isInstantApp()) {
41-
implementation "com.google.android.gms:play-services-instantapps:$versions.instantAppsVersion"
42-
}
43-
4440
if (rootProject.findProject(":lib")) {
4541
implementation project(":lib")
4642
} else if (rootProject.findProject(":godot:lib")) {
@@ -94,7 +90,7 @@ android {
9490
jvmTarget = versions.javaVersion
9591
}
9692

97-
assetPacks = isInstantApp() ? [] : [":assetPackInstallTime"]
93+
assetPacks = [":assetPackInstallTime"]
9894

9995
namespace = 'com.godot.game'
10096

platform/android/java/app/config.gradle

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ ext.versions = [
1515
// Also update 'platform/android/detect.py#get_ndk_version()' when this is updated.
1616
ndkVersion : '28.1.13356709',
1717
splashscreenVersion: '1.0.1',
18-
openxrVendorsVersion: '4.0.0-stable',
19-
instantAppsVersion: '17.0.0'
18+
openxrVendorsVersion: '4.0.0-stable'
2019

2120
]
2221

@@ -380,8 +379,3 @@ ext.getAddonsDirectory = { ->
380379
String addonsDirectory = project.hasProperty("addons_directory") ? project.property("addons_directory") : ""
381380
return addonsDirectory
382381
}
383-
384-
ext.isInstantApp = { ->
385-
String instantApp = project.hasProperty("play_instant_app") ? project.property("play_instant_app") : ""
386-
return Boolean.parseBoolean(instantApp)
387-
}

0 commit comments

Comments
 (0)