Skip to content

Commit 9e4365f

Browse files
committed
Export the rendering/renderer/rendering_method.mobile project setting to the AndroidManifest
The AndroidManifest already stores the Godot editor and library versions. The addition of this meta-data allows to identify Godot Android apps that may be subject to renderer specific issues addressed in future versions of the engine.
1 parent 0b6a717 commit 9e4365f

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed

platform/android/export/export_plugin.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3406,6 +3406,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
34063406
}
34073407

34083408
String addons_directory = ProjectSettings::get_singleton()->globalize_path("res://addons");
3409+
String current_renderer = GLOBAL_GET("rendering/renderer/rendering_method.mobile");
34093410

34103411
cmdline.push_back("-p"); // argument to specify the start directory.
34113412
cmdline.push_back(build_path); // start directory.
@@ -3423,6 +3424,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
34233424
cmdline.push_back("-Pperform_signing=" + sign_flag); // argument to specify whether the build should be signed.
34243425
cmdline.push_back("-Pcompress_native_libraries=" + compress_native_libraries_flag); // argument to specify whether the build should compress native libraries.
34253426
cmdline.push_back("-Pgodot_editor_version=" + String(VERSION_FULL_CONFIG));
3427+
cmdline.push_back("-Pgodot_rendering_method=" + current_renderer);
34263428

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

platform/android/java/app/AndroidManifest.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
<meta-data
3434
android:name="org.godotengine.editor.version"
3535
android:value="${godotEditorVersion}" />
36+
<!-- Records the rendering method used by the Godot engine -->
37+
<meta-data
38+
android:name="org.godotengine.rendering.method"
39+
android:value="${godotRenderingMethod}"/>
3640

3741
<activity
3842
android:name=".GodotApp"

platform/android/java/app/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ android {
102102
abiFilters export_abi_list
103103
}
104104

105-
manifestPlaceholders = [godotEditorVersion: getGodotEditorVersion()]
105+
manifestPlaceholders = [
106+
godotEditorVersion: getGodotEditorVersion(),
107+
godotRenderingMethod: getGodotRenderingMethod()
108+
]
106109

107110
// Feel free to modify the application id to your own.
108111
applicationId getExportPackageName()

platform/android/java/app/config.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ ext.getExportTargetSdkVersion = { ->
7070
}
7171
}
7272

73+
ext.getGodotRenderingMethod = { ->
74+
String renderingMethod = project.hasProperty("godot_rendering_method") ? project.property("godot_rendering_method") : ""
75+
return renderingMethod
76+
}
77+
7378
ext.getGodotEditorVersion = { ->
7479
String editorVersion = project.hasProperty("godot_editor_version") ? project.property("godot_editor_version") : ""
7580
if (editorVersion == null || editorVersion.isEmpty()) {

0 commit comments

Comments
 (0)