Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
Gradle builds for Android
Godot provides the option to build using the gradle buildsystem. Instead of using the already pre-built template that ships with Godot, an Android Java project gets installed into your project folder. Godot will then build it and use it as an export template every time you export the project.
Il y a certaines raisons pour lesquelles vous pourriez vouloir le faire :
Modifier le projet avant sa construction.
Ajoutez des SDK externes qui se construisent avec votre projet.
Configuring the gradle build is a fairly straightforward process. But first you need to follow the steps in exporting for android up to Setting it up in Godot. After doing that, follow the steps below.
Set up the gradle build environment
Go to the Project menu, and install the Gradle Build template:

Assurez-vous que les modèles d'exportation sont téléchargés. Sinon, ce menu vous aidera à le faire.
A Gradle-based Android project will be created under res://android/build
.
Editing these files is not needed unless you really need to modify the project.
Enabling the gradle build and exporting
When setting up the Android project in the Project > Export dialog, Gradle Build needs to be enabled:

Désormais, tenter d'exporter le projet ou de déployer en un clic appellera le système de compilation Gradle pour générer de nouveaux modèles (cette fenêtre apparaîtra à chaque fois) :

Les modèles construits seront utilisés automatiquement par la suite, donc aucune configuration supplémentaire n'est nécessaire.
Note
When using the gradle Android build system, assets that are placed within a folder whose name begins with an underscore will not be included in the generated APK. This does not apply to assets whose file name begins with an underscore.
For example, _example/image.png
will not be included as an asset,
but _image.png
will.