Skip to content

Export your game

1. Install export templates

Open Editor > Manage Export Templates and install the official templates matching the editor version, to supply Godot's platform executables. The addon supplies the JVM GDExtension; no custom Godot templates are needed.

2. Build your project

Select Build Release in Godot's toolbar and click Run Gradle before a release export (Export Project), which packs jvm/release/; select Build before an export with debug (Export with Debug), which packs jvm/debug/. For another target, use the platform build action in its page below. The preset warns about the variant that has not been built, and an export whose variant is missing reports the artifact it needs. The editor itself always loads jvm/debug/ and resolves the script classes of an export from it, so Build has to have run before any export, a release export included; without it the exported class cache knows none of your scripts.

3. Prepare the runtime

Follow the target page so the exported game can execute your code:

  • Desktop: bundle an embedded JRE.
  • Android: use ART and prepare Android artifacts.
  • GraalVM native image: compile a native image for desktop.
  • iOS: build the native image required by iOS.

4. Create a preset and export

Open Project > Export, add an export preset for your platform, and resolve missing-file warnings so all runtime artifacts are included. Click Export Project and choose a destination. The export packs only the artifacts of its own variant, never both.

5. Run the exported build

Launch the exported executable to verify the same behavior as in the editor. Run it from a terminal if you need to inspect startup output. For a missing runtime warning, prepare the runtime for the preset's OS and architecture and export again.

Preserve runtime files

Do not wipe user:// while the game is installed. It holds extracted runtime files. When clearing game data, delete only files your code created.

Details: Reference.

Next: Desktop.