utopia-rise / godot-kotlin-jvm

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

Refactor `GDKotlin` #258

Closed chippmann closed 4 months ago

chippmann commented 3 years ago

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.

CedNaru commented 3 years ago

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)

piiertho commented 3 years ago

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

chippmann commented 2 years ago

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