rocketraman
01/13/2022, 12:16 AMCreateStartScripts
for a target in the JVM part of a multiplatform project. The usual setting classpath via tasks.getByName("jar").outputs.files + configurations.getByName("runtimeClasspath")
does not work. Anyone know the right values?
I've tried
classpath = tasks.getByName("jar").outputs.files +
tasks.getByName("jvmJar").outputs.files +
configurations.getByName("jvmRuntimeClasspath")
but it doesn't work. The script doesn't have the right classpath. Its missing the jar that is output in build/libs
and it also seems to be missing some core stuff like "coroutines" that is defined in common.
SOLVED, seems to work:
val backendJar by tasks.existing
val backendRuntimeClasspath by configurations.existing
classpath = files(backendJar, backendRuntimeClasspath)
See also https://youtrack.jetbrains.com/issue/KT-50227