Dominaezzz / kotlin-imgui

Kotlin bindings for Dear ImGui
MIT License
83 stars 4 forks source link

Misc cleanup #20

Closed nlbuescher closed 3 years ago

nlbuescher commented 3 years ago
Dominaezzz commented 3 years ago

In the first commit,

java source files are not processed as part of Kotlin/JVM in multiplatform, so the the source folder needs to be added as part of the java plugin configuration.

Java files are processed if withJava() is specified I think.

nlbuescher commented 3 years ago

That's correct, but since I moved the generated files into the build folder I had to add the generated sources folder manually

Dominaezzz commented 3 years ago

Ah, I remember this. I wanted to put the java files in the build folder and the plugin was fighting me. I agree it should be in the build folder but not if it means going behind the kmp plugin's back with this bit.

java {
    sourceSets.named("main") {
        java.srcDir(swigJavaDir)
    }
}

Can we still achieve this using only the kotlin { ... } DSL?

I'm generally happy with the non-gradle changes and most of the gradle changes.

name native targets without arch

This won't work for when we add 32 bit targets, what will we name them then.

Do you mind squashing the regression commits into the first/second commit?

nlbuescher commented 3 years ago

Can we still achieve this using only the kotlin { ... } DSL?

We actually can't. The withJava() bit is a convenience function that sets up the java plugin to work with the kotlin-jvm plugin for us, so it does the same thing. We just have to set up one extra folder after withJava() configures the rest of the plugin because it's outside the default source directory structure.

I'm generally happy with the non-gradle changes and most of the gradle changes.

name native targets without arch

This won't work for when we add 32 bit targets, what will we name them then.

Good point. I'll change that back.

Do you mind squashing the regression commits into the first/second commit?

Yeah I'll do that

nlbuescher commented 3 years ago

I've removed and squashed the relevant commits