Paulo Cereda
06/12/2025, 2:20 PMPaulo Cereda
06/12/2025, 2:25 PMapi
• cli
(main entry)
• core
• kotlin-dsl
• lua
• mvel
Source code has bits in common
and jvm
. We target only JVM at the moment, and pack everything via the shadow
plugin. Back then, we tried to target Java 8, but we are keen on raising the bar to Java 11.
(continued)Paulo Cereda
06/12/2025, 2:26 PMPaulo Cereda
06/12/2025, 2:28 PMshadow
work for whatever reason. I even came to a point where
$ ./gradlew run
was actually working, but no way I could make build
generate a fat .jar
for us.
(continued)Paulo Cereda
06/12/2025, 2:29 PMtapchicoma
06/12/2025, 3:03 PMPaulo Cereda
06/12/2025, 4:15 PMshadow
, thank you! gratitude thank you Out of curiosity, I thought shadowJar
would be automatically tied up to build
, so when
$ ./gradlew build
was called, I'd also have my fat .jar
built as well, but it seems this is not the case here. What I did, and I don't know if it's advisable, is to add
tasks {
build {
dependsOn("shadowJar")
}
...
}
to my cli/build.gradle.kts
, so shadowJar
would be triggered in the build
phase (to the best of my understanding). Thanks again, now there's only one additional thing I need to figure out. 🙂Paulo Cereda
06/12/2025, 4:19 PMjvm
target to, e.g, Java 11. At the moment, I have
subprojects {
configure<KotlinMultiplatformExtension> {
jvm {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_11)
}
}
}
...
}
in my main build.gradle.kts
, but I don't think it's working. I used to rely on jvmToolchain(11)
in other projects, but I've never done this in a multi-module Multiplatform, so any hints would be appreciated. 🙂 (I also might need a newbie intro to that, because my brain is frying from this overflow 😁_)_tapchicoma
06/12/2025, 4:22 PMjvm {}
basically creates a JVM target - otherwise your snippet should worktapchicoma
06/12/2025, 4:23 PMjvmToolchain(11)
does the same and available for KotlinBaseExtension
(doc) which KotlinMultiplatformExtension
inheritsPaulo Cereda
06/12/2025, 4:54 PMconfigure<KotlinMultiplatformExtension> {
jvmToolchain(11)
}
to make it less cluttered. 😉 Edit: this does not work, oopsie. 😅Paulo Cereda
06/12/2025, 6:50 PMjvmToolchain
raises me another error:
Task with name 'jvmTest' not found in project ':api'.
whereas my code above seems to work...tapchicoma
06/12/2025, 7:55 PMPaulo Cereda
06/12/2025, 8:16 PM