-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the Android documentation for Godot 4.2 #7884
Update the Android documentation for Godot 4.2 #7884
Conversation
2f1595c
to
c224e21
Compare
c224e21
to
c451d57
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great to me! Just a couple notes from skimming the diff
c451d57
to
5888d98
Compare
5888d98
to
17b5c59
Compare
Reminder from RocketChat to incorporate the NDK location or rather the instructions to compile godot-cpp via scons for Android when the NDK is not at the root directory. In this case the |
I peeked into the documentation in the commit code. I am not sure I can read the documentation without this getting merged, but I tried. I have few comments, correct me if I am wrong somewhere, Building and Packaging the Plugin
On a side note, version 4.1.1 version is missing in the maven repo
+ MyPLugin
|
+--.bin/ # output location for the AAR binaries
| |
| +--MyPlugin.1.1.2.release.aar # the release version of the aar file (naming standards is up to the creator)
| |
| +--MyPlugin.1.1.2.debug.aar # the debug version of the aar file (naming standards is up to the creator)
|
+--.export/ # scripts directory
| |
| +--editor_export_plugin.gd # EditorExportPlugin tool script
| |
| +--editor_plugin.gd # EditorPlugin tool script
|
+--plugin.cfg # plugin INI file Too much work for the plugin to be created, compared to just generating a gdap file, but I hope there are merits to it.
Using the plugin
Thanks for the hard work of refactoring the plugin for android, I haven't started testing yet, let me know if there is any way I can get hold of godot library aar file so that I can start testing with simple plugins. 👍 😎 |
I think it is necessary to modify |
Is this going to be updated sometime soon? BTW, I saw aar files in the Godot builds, I hope I can use them for dependency. Let me know. |
@tokengamedev yes, I'm working on incorporating the received feedback; expect an update this week.
The AAR files are generated for each build and also pushed to mavencentral so feel free to use whichever is easier for your workflow: |
@m4gr3d With Godot 4.2 beta imminent, what is the status of this? :) |
@mhilbrunner, working on that today! I was blocked working on the sample apps to go alongside the documentation; I completed those yesterday (see godotengine/godot#82893 and m4gr3d/Godot-Android-Samples@94a6480) so I should be now unblocked. |
3a5d55a
to
9779fa1
Compare
9779fa1
to
d5a8803
Compare
Great to hear :) No pressure or anything, just wanted to check. Feel free to ping me once ready to review/merge! |
d5a8803
to
d14ccc8
Compare
@tokengamedev I've addressed your questions / feedback below.
You can take a look as my branch as github should generate and make the documentation readable: https://github.com/m4gr3d/godot-docs/blob/update_android_plugin_tutorial/tutorials/platform/android/android_plugin.rst
That's correct, maven dependency is the preferred and recommended approach, but the local godot library aar will continue to be provided for the time being for those that prefer that approach. Until 4.2 is stable, you can use the snapshot versions available at https://s01.oss.sonatype.org/content/repositories/snapshots/org/godotengine/godot/4.2.0.dev-SNAPSHOT/. Those versions are updated for each dev / beta release. To use the snapshot versions, you'll need to include the maven url for the snapshot repo. See here for reference.
This has been fixed, and it should now be available.
This has been reduced to the following:
So using your example, that would correspond to:
So compared to the previous (.gdap) approach, only one additional script file is added.
The merits are most evident for plugins that provide customization options. The previous (.gdap) approach had no such capabilities. With the new approach, v2 Android plugins can now:
The Godot OpenXR Loaders plugin makes heavy use of the new capabilities to provide options, capabilities and plugin binaries for multiple OpenXR vendors. Take a look at its implementation for reference.
The Godot OpenXR Loaders plugin is a good reference for usage of the methods:
No, only the first time in the project settings is required. Once the plugin is enabled in the project settings, it's then up to the plugin developer whether additional checks are required or not.
The name used is the one returned by GodotPlugin#getPluginName().
Feel free to take a look at https://github.com/m4gr3d/Godot-Android-Samples/tree/master, a collection of samples I develop for reference. |
@mhilbrunner Ready for review! |
@@ -130,7 +130,7 @@ source,destination | |||
/getting_started/workflow/best_practices/scene_organization.html,/tutorials/best_practices/scene_organization.html | |||
/getting_started/workflow/best_practices/scenes_versus_scripts.html,/tutorials/best_practices/scenes_versus_scripts.html | |||
/getting_started/workflow/best_practices/what_are_godot_classes.html,/tutorials/best_practices/what_are_godot_classes.html | |||
/getting_started/workflow/export/android_custom_build.html,/tutorials/export/android_custom_build.html | |||
/getting_started/workflow/export/android_custom_build.html,/tutorials/export/android_gradle_build.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means redirects would break for 4.0 and 4.1. I think adding a new second redirect with this instead should work fine, hopefully. Not 100% sure, it's been some time since messing with the redirects.
Alternatively (and potentially simpler) we could rename the page in 4.0 and 4.1 too and then have this redirect everywhere in 4.x, if it applies to all versions?
Or leave it as is, even if not 100% great. The redirects are pretty brittle, unfortunately. We can still change the doc title, just not the URL/file name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively (and potentially simpler) we could rename the page in 4.0 and 4.1 too and then have this redirect everywhere in 4.x, if it applies to all versions?
This change would apply to all 4.x versions so I can provide another PR for this change against the 4.1 and 4.0 branch for backport.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mhilbrunner I've backported the changes in #8217
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PNGs need to be converted to WebP for newly added/changed images (see image creation guidelines).
Besides that and the other small things I noted above, I spotted nothing. Great work :)
d14ccc8
to
b3958d0
Compare
b3958d0
to
66ee5cb
Compare
@mhilbrunner I've addressed your feedback! |
Merged 🎉 Great work! |
@m4gr3d thanks for the update, sorry could not reply earlier as been busy with the game code 🤓. I will try to check out this week. |
Draft for updates to the Android documentation for Godot 4.2:
Remaining TODOs (to be addressed in follow-up PRs):
Docs maintainers note: ping Yuri once merged