godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.17k stars 98 forks source link

Add a way to programmatically edit `build.gradle` for Android plugins #11172

Open DexterFstone opened 1 week ago

DexterFstone commented 1 week ago

Describe the project you are working on

Android plugin

Describe the problem or limitation you are having in your project

I need to add manifestPlaceholder to build.gradle for my Android plugin, but inside Editor there is no API for it, the only way is to open the build.gradle file and add manifestPlaceholder manually

Describe the feature / enhancement and how it helps to overcome the problem or limitation

if I want to share my Android plugin, everyone needs to add manifestPlaceholder for themself, add an API in EditorExportPlugin makes it easier for all

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

func _get_android_manifest_placeholder_contents(platform: EditorExportPlatform, debug: bool) -> String:
    return "place manifestPlaceholder content here"

If this enhancement will not be used often, can it be worked around with a few lines of script?

The build.gradle file needs to be edited manually

Is there a reason why this should be core and not an add-on in the asset library?

The build.gradle file needs to overwrite at compile time so addons cannot do that