utopia-rise / godot-kotlin-jvm

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

Improve use of Java wrappers #595

Closed CedNaru closed 3 months ago

CedNaru commented 3 months ago

First step of GDKotlin rework.

First, I changed the locations of many files to remove the bloat from the main src/ directory: image

I created a new jvm_wrapperdirectory meant for the previously named JavaWrapperand all its child classes. binding is also a newcomer, previously named memory, but most of its content got moved to jvm_wrapper/memory

I improved the way we declare wrappers, instance like singletons and added to them a bunch of missing functions that now replace the manual JNI calls we had to do in GDKotlin.

Because there are a lot of changes. I encourage you to mostly look at GDKotlin, JvmInstanceWrapper, JvmSingletonWrapper and a few wrapper implementations to see how it's used.

CedNaru commented 3 months ago

Export working for Windows and Android.