Skip to content

Commit 307df63

Browse files
committed
Fix running programs from jvmDemo with Kotlin 1.9.10 plugin
1 parent 96a14c1 commit 307df63

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

buildSrc/src/main/kotlin/org/openrndr/extra/convention/kotlin-multiplatform.gradle.kts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,4 +165,13 @@ if (shouldPublish) {
165165
setRequired({ isReleaseVersion && gradle.taskGraph.hasTask("publish") })
166166
sign(publishing.publications)
167167
}
168-
}
168+
}
169+
170+
kotlin {
171+
jvm().mainRun {
172+
classpath(kotlin.jvm().compilations.getByName("demo").output.allOutputs)
173+
classpath(kotlin.jvm().compilations.getByName("demo").configurations.runtimeDependencyConfiguration!!)
174+
}
175+
}
176+
177+
tasks.withType<JavaExec>().matching { it.name == "jvmRun" }.configureEach { workingDir = rootDir }

gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ org.gradle.parallel=true
1010
org.gradle.caching=true
1111
# Whether to automatically bundle the Kotlin standard library (true by default)
1212
# https://kotlinlang.org/docs/gradle.html#dependency-on-the-standard-library
13-
kotlin.stdlib.default.dependency=true
13+
kotlin.stdlib.default.dependency=true
14+
kotlin.mpp.import.legacyTestSourceSetDetection=true

0 commit comments

Comments
 (0)