Skip to content

Conversation

m4gr3d
Copy link
Collaborator

@m4gr3d m4gr3d commented Feb 22, 2025

The first commit adds support for exporting Meta's apks when using the Android / XR editor:

  • Update the project to generate Meta's specific prebuilt apks.
    • This is done by adding Godot as a submodule to this project and updating the build scripts to generate the prebuilt apk using that submodule
    • The resulting prebuilt apks are stored in the addon and used by the export logic to override the custom templates, custom_template/debug and custom_template/release, options
  • Leverage EditorExportPlugin#_update_android_prebuilt_manifest(...) introduced in Updates and fixes to the Android prebuilt export logic godotengine/godot#103173 to hook into the editor export logic for prebuilt apks, and modify prebuilt's manifest to match the project settings
    • This is only enabled on the Android / XR editor. On desktop, the plugin falls back to the gradle build

The second commit adds a gdextension configuration for the Android / XR editor:

  • The previous logic only uses ANDROID_ENABLED to gate the Platform SDK logic, which causes it to be active when the addon is loaded in the Android / XR editor. The updated logic adds an editor specific build for the Android / XR editor which disables the Platform SDK logic.

Depends on godotengine/godot#103173

@m4gr3d m4gr3d added the enhancement New feature or request label Feb 22, 2025
@m4gr3d m4gr3d force-pushed the support_exporting_meta_apks branch 5 times, most recently from ccee57c to 11a1230 Compare March 6, 2025 19:24
@m4gr3d m4gr3d marked this pull request as ready for review March 7, 2025 07:53
@m4gr3d m4gr3d force-pushed the support_exporting_meta_apks branch from 11a1230 to 38b934e Compare March 7, 2025 22:20
m4gr3d added 2 commits March 7, 2025 14:34
The previous logic only uses `ANDROID_ENABLED` to gate the Platform SDK logic, which causes it to be active when the addon is loaded in the Android / XR editor.
The updated logic adds an editor specific build for the Android / XR editor which disables the Platform SDK logic.
@dsnopek
Copy link
Collaborator

dsnopek commented Jun 24, 2025

Currently, this PR uses a git submodule to point to the Godot source code for making the prebuilt APKs, but I think we'll probably want to be able to build multiple versions of Godot, so that folks can use an export template matching their editor version.

While I guess the editor plugin part will only work on Godot 4.5+ (since it needs it to modify the binary version of the AndroidManifest.xml), I could imagine that a single version of this extension could work across multiple Godot versions (for example, Godot 4.5 and 4.6) and we'll want to have builds for each of those versions.

I think this is more evidence for the idea that we probably don't want to include the export templates in the addon itself, but provide an editor tool to download them. (I also think this is a good idea, because it's mostly folks using the Android editor who will want to do the APK build, whereas folks working on desktop may be happy to keep doing the Gradle build, so we don't need to balloon the addon size for everyone.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants