Skip to content

Releases: youngledo/godot-java

v0.6.1

21 May 13:31

Choose a tag to compare

Highlights

  • Fixed several math type bugs in Plane, AABB, Quaternion, Transform2D, Basis, and Transform3D — boundary conventions, rotation directions, and inverse() origin computation were corrected
  • Test coverage jumped to 97.5% with ~50 new unit tests and 4 new integration test scenarios
  • JaCoCo coverage reporting now configured for godot-java-core

Bug Fixes

  • Transform2D.inverse() had incorrect origin computation
  • Basis.fromEuler()/toEuler() had wrong formulas and rotation direction
  • Plane, AABB edge-touching boundary conventions were inconsistent
  • Quaternion, Transform3D rotation direction conventions were mismatched

Testing

  • Enabled 6 previously-skipped unit tests (Plane, AABB, Quaternion, Transform2D, Basis, Transform3D)
  • Added unit tests for: Color, Vector2i/3i/4i, Rect2i, Projection, Rid, annotation enums, dispatch records, Callable, ConnectHandle, Signal
  • Added integration tests for: GodotArray, GodotDictionary, Callable, ConnectHandle
  • Total: 560 unit tests + 24 integration tests, all passing

Migration from 0.6.0

No API changes. If you were affected by incorrect math computations in the types listed above, results may now differ — the new behavior matches Godot's conventions.

v0.6.0

21 May 04:26

Choose a tag to compare

Highlights

  • MainLoop callbacks — Register startup/frame/shutdown listeners via Bootstrap.setMainLoopFrameListener()
  • PackedArray rich API — Full-featured wrappers for all 10 PackedArray types with sort(), reverse(), subarray(), etc.
  • InitLevel per-level registration@GodotClass(initLevel=...) for controlling class registration lifecycle
  • Editor plugin support — New @EditorPlugin and @EditorProperty annotations
  • Typed signal awaitawaitSignal() returns typed args; TypedSignal supports timeout
  • Double-precision builds — Maven profile double-precision for real_t = double
  • Lazy API loading — Optional lazy-api-load profile for on-demand function resolution

Features

  • @OnReady annotation for lifecycle field initialization
  • @Export(defaultValue=...) for property revert in editor
  • @ExportToolButton annotation for editor tool buttons
  • @RequiredInEditor annotation for editor property validation
  • SignalBuilder with ConnectFlags for fluent signal connections
  • Callable round-trip support + generated VirtualStubs interface
  • Resources utility class with type-aware property metadata
  • CollectionTypeMeta for typed collection property metadata
  • GodotApiVersion constants generated from extension_api.json
  • api-custom Maven profile for alternative Godot API JSON
  • Virtual method stubs added to Godot base class
  • Relaxed Variant conversion for GDScript-like type coercion
  • Optional lazy API function loading
  • JMH benchmark module for performance regression detection
  • Maven profiles consolidated for feature flags
  • Tests reorganized by functional area

Bug Fixes

  • Fix APT duplicate class registration for multi-annotated classes
  • Fix PackedVector4Array support in type mapper and engine calls
  • Wire _getConfigurationWarnings interception in VirtualDispatch
  • Fix GodotDictionary/GodotArray no-arg constructor memory safety

Migration from 0.5.x

  • Java 25 required (enforced)
  • @GodotClass(initLevel=) replaces global init level for per-class control
  • GodotArray/GodotDictionary no-arg constructors create null wrappers; use of() or fromMap()/fromList() for new instances

v0.5.0

18 May 07:19

Choose a tag to compare

What's New in 0.5.0

jlink Embedded Runtime

  • C++ shim discovers adjacent runtime/ directory for jlink-bundled JRE
  • jlink Maven profile in godot-java-examples for self-contained distribution

New APIs

  • GodotScope — Virtual Thread coroutine system with delay and signal await
  • Godot.as() — safe downcasting (gdext match_class equivalent)
  • Godot.launch() — convenience method with coroutine flush
  • @GetProperty / @SetProperty / @GetPropertyList — dynamic property support
  • @ValidateProperty — property validation hook
  • @Export(getter/setter/readOnly) — custom getter/setter for exported properties

Fixes

  • Use privateLookupIn for VarHandle/MethodHandle access to private fields
  • Log full DispatchIndex load exception instead of just message
  • Fix codegen-compat CI: use godot-headers repo for extension_api.json

Infrastructure

  • CI paths filter to skip non-code changes
  • push-and-release skill for automated release pipeline

v0.4.0

17 May 11:16

Choose a tag to compare

What's New in v0.4.0

New Annotations

  • @GodotClass(singleton=true) — Auto-register engine singletons via ClassDB_register_singleton
  • @GodotClass(internal=true) — Hide classes from the Godot editor (is_exposed=0)
  • @Constant — Expose static final int/long fields as GDScript integer constants
  • @GodotMethod(virtual=true) — Register script-overridable methods via CLASSDB_REGISTER_EXTENSION_CLASS_VIRTUAL_METHOD
  • @Tool — Mark classes as editor-processable (runs in editor, not just game runtime)

Editor Documentation Registration

APT processor extracts /// Markdown Javadoc from @GodotClass sources, converts Markdown→BBCode→Godot XML class reference format, and registers docs in the Godot editor via EDITOR_HELP_LOAD_XML_FROM_UTF8_CHARS_AND_LEN.

Cross-Thread Utility

  • Godot.runOnMainThread(Runnable) — Safely schedule tasks from background threads onto the Godot main thread

New Examples

  • 11-scene-loading — Dynamic scene loading
  • 12-rpc-chat — Multiplayer RPC chat
  • 13-tool-node — Editor tool node
  • 14-singleton — Auto-registered singleton
  • 15-virtual-method — Script-overridable methods
  • 16-constants — Integer constants in GDScript

Internal Changes

  • StructOffsets generator supports GDExtensionClassVirtualMethodInfo (88-byte struct)
  • Bridge.callVoid overload for 4 pointer args + long + int
  • DeferredExecutor.flush() integrated into virtual dispatch callback
  • CONTRIBUTING.md converted to English with Markdown Javadoc requirement
  • CLAUDE.md symlink for Claude Code integration

Requirements

  • Java 25
  • Maven >= 4.0.0-rc-5
  • Godot 4.x

Installation

<dependency>
    <groupId>io.github.youngledo</groupId>
    <artifactId>godot-java-core</artifactId>
    <version>0.4.0</version>
</dependency>

Download native libraries for your platform from the assets below.

v0.3.0

17 May 01:50

Choose a tag to compare

What's New in v0.3.0

Hot Reload Support

Development-time hot reload via ClassLoader hot-swap. The JVM stays running while user classes are reloaded from an updated JAR.

  • Godot.reloadUserCode(jarPath) — public API to trigger reload programmatically
  • HotReloadWatcher — automatic JAR file change detection (enabled via GODOT_JAVA_HOT_RELOAD=true)
  • Registry.unregisterUserClasses() / reloadUserClasses() — full unregister → rescan → re-register lifecycle
  • recreate_instance_func callback — allows Godot to re-create Java wrappers for existing engine objects after reload
  • Dispatch.reload(ClassLoader) — swaps the APT-generated dispatch index at runtime

RPC Support

New @Rpc annotation for multiplayer RPC methods:

  • @Rpc annotation with mode, transferMode, and callLocal attributes
  • RpcMode enum: DISABLED, ANY_PEER, AUTHORITY
  • TransferMode enum: UNRELIABLE, UNRELIABLE_ORDERED, RELIABLE

Signal & Connect Improvements

  • TypedSignal<T> — type-safe signal wrapper for Signal and SignalWithArguments<T>
  • ConnectBuilder — fluent API for signal connections with options (deferred, oneshot, objectId)
  • ConnectHandle — lightweight handle for disconnecting signals

Other Changes

  • Remove docs/comparison.md
  • Internal: Bridge.ARENA for all upcall stubs, lazy dispatch initialization

v0.2.0

15 May 03:34

Choose a tag to compare

New Features

  • Typed Signal API (TypedSignal0-TypedSignal5)
  • Enum/bitfield types for method signatures (e.g. DisplayServer.WindowMode)
  • Export DSL with @ExportGroup, @ExportSubgroup, PropertyUsage
  • Typed ptrcall ABI for primitives, GodotArray, PackedArray
  • Godot.instantiate() API
  • Multi-platform CI (macOS, Ubuntu, Windows)

Breaking Changes

  • Method params/returns changed from int/long to enum types
  • GodotArray no longer Iterable — use indexed loop instead
  • getOverlappingBodies() etc. now return GodotArray

Infrastructure

  • Native library published to Maven with auto-sync
  • Unified gdextension path to res://godot-java/
  • Demo projects use symlinks to share native lib