godot-kotlin-jvm icon indicating copy to clipboard operation
godot-kotlin-jvm copied to clipboard

Refactor `GDKotlin`

Open chippmann opened this issue 3 years ago • 3 comments

Follow up issue from #256. Currently gd_kotlin.cpp is a mess as it slowly grew in functionality and complexity. We have to refactor it at some point.

chippmann avatar Jul 29 '21 09:07 chippmann

I agree that it's becoming messy. I think I'll handle this one as I had started to clean this file a few months ago and I already had some plans in mind. I want to: -Create more C++ singleton that wraps Kotlin Singleton -Split GDKotlin into different files for responsibilities -Group the hardcoded string paths into a single globally accessible struct. -Create a clear difference between the code handling the JVM type and the OS. For now, they are glued together. And it'll get even messier when we will add more platforms (IOS in mind)

CedNaru avatar Jul 29 '21 13:07 CedNaru

I agree that it's becoming messy. I think I'll handle this one as I had started to clean this file a few months ago and I already had some plans in mind. I want to: -Create more C++ singleton that wraps Kotlin Singleton -Split GDKotlin into different files for responsibilities -Group the hardcoded string paths into a single globally accessible struct. -Create a clear difference between the code handling the JVM type and the OS. For now, they are glued together. And it'll get even messier when we will add more platforms (IOS in mind)

I strongly agree with this plan

piiertho avatar Jul 29 '21 18:07 piiertho

This issue is postponed until https://github.com/utopia-rise/godot-kotlin-jvm/milestone/9 is done

chippmann avatar Mar 13 '22 11:03 chippmann