utopia-rise / godot-kotlin-jvm

Godot Kotlin JVM Module
MIT License
562 stars 38 forks source link

Fix reflection usage in exported projects #572

Closed chippmann closed 3 months ago

chippmann commented 5 months ago

Fixes #571

Note: this is intended as a quick fix for #571 so we can publish a hotfix. We still need to further investigate if a separate bootstrap jar for exported projects is still a good idea and still needed or if we should just export the bootstrap jar we ship with the editor.

@piiertho the graalvm config for the newly added tests are missing here. As i cannot remember how to check which configs are missing, could you give me a quick heads up again on discord?

This was tested on linux x64 on editor builds, debug and release exports.

Marked as draft until missing graalvm configs are added.

chippmann commented 5 months ago

@MartinHaeusler I'd appreciate if you could test this with your project as well if possible and you have the time.

MartinHaeusler commented 5 months ago

@chippmann I've just tested it locally; I checked out this PR from github, built the godot plugin, published to maven local, loaded it from there in my project, and did a clean build of my project. The godot-bootstrap.jar which was created this way now contains the full kotlin/reflect/jvm and kotlin/reflect/full packages. I then used the godot editor to export the project and started the standalone executable; everything worked like a charm!

Thank you very much for your efforts :)