Packaging options
These options control library packaging, optional coroutine support, and fast builds.
Packaging and optional features
Custom Godot API bindings
By default, the plugin uses the Godot API library published with the selected Godot-JVM release. Enable custom API generation when the project uses a newer Godot build, additional engine modules, or GDExtensions that expose extra API classes:
1 2 3 | |
The plugin reads api.json from the root Gradle project by default. Set apiJsonFile when the file is elsewhere; it has no effect while isCustomApiEnabled is false:
1 2 3 4 | |
When enabled, the plugin generates and compiles a local binding jar, compiles user code against it, and adds it to godot-bootstrap.jar instead of the published API library. The maintained core and runtime libraries remain published dependencies.
Generation covers engine classes and the runtime classes of GDExtensions. Editor-only classes, from the engine or from a GDExtension, are not generated, as with the published API library.
Custom generation only produces the API-layer classes. The maintained core types and helpers, including Object, RefCounted, signals, callables, connectors, and coroutine support, remain the published versions. generateCustomGodotApi, its compilation, and customGodotApiJar use declared Gradle inputs and outputs. An unchanged api.json is therefore up to date and can be restored from the Gradle build cache. packageBootstrapJar also remains up to date while its binding jar and other inputs are unchanged.
This consumer task is separate from the API generator plugin's existing generateAPI task used by Godot-JVM maintainers to regenerate the published libraries.
isLibrary
Marks the project as a reusable Godot-JVM library instead of a runnable Godot project.
Default:
false
Example:
1 2 3 | |
When enabled, the plugin:
- keeps compile setup and Godot dependencies
- skips registrar scanning and
.gdjgeneration for the local project - skips the runnable-project packaging flow
- leaves a regular library JAR as the final artifact
Unlike registration.disableGdj, isLibrary turns off the whole local runtime-registration pipeline rather than only the .gdj part of it.
isGodotCoroutinesEnabled
Adds the Godot coroutine library and Kotlin coroutines dependency.
Default:
false
Example:
1 2 3 | |
godotGameImplementation and godotSplitImplementation dependencies
Dependencies declared with implementation are merged into godot-bootstrap.jar. Two additional
dependency configurations control different packaging requirements:
1 2 3 4 | |
godotGameImplementationmerges the dependency intousercode.jar(intogame.jarin release builds). Use it when the library must load user-code classes or be recreated with editor reloads.godotSplitImplementationpreserves the dependency as a separate JAR inres://jvm/<variant>/dependencies/, on the class path ofgodot-bootstrap.jar(ofgame.jarin release builds), so it is loaded once likeimplementationdependencies and a change to it needs an editor restart. Use it for signed JARs or libraries that cannot be merged safely. Only desktop JVM runs keep the JAR intact: native images compile it intogameand Android dexes it into the dex JAR, because neither runtime can load a JAR.
Both configurations are available while compiling and testing, but neither is merged into
godot-bootstrap.jar.
Fast builds
The fastBuild task reuses the previous registration artifacts.