diff --git a/buildSrc/src/main/kotlin/org/openrndr/extra/convention/kotlin-multiplatform.gradle.kts b/buildSrc/src/main/kotlin/org/openrndr/extra/convention/kotlin-multiplatform.gradle.kts index 66ff570b..baa7d26c 100644 --- a/buildSrc/src/main/kotlin/org/openrndr/extra/convention/kotlin-multiplatform.gradle.kts +++ b/buildSrc/src/main/kotlin/org/openrndr/extra/convention/kotlin-multiplatform.gradle.kts @@ -165,4 +165,13 @@ if (shouldPublish) { setRequired({ isReleaseVersion && gradle.taskGraph.hasTask("publish") }) sign(publishing.publications) } -} \ No newline at end of file +} + +kotlin { + jvm().mainRun { + classpath(kotlin.jvm().compilations.getByName("demo").output.allOutputs) + classpath(kotlin.jvm().compilations.getByName("demo").configurations.runtimeDependencyConfiguration!!) + } +} + +tasks.withType().matching { it.name == "jvmRun" }.configureEach { workingDir = rootDir } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index c12fd848..3432648a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,4 +10,5 @@ org.gradle.parallel=true org.gradle.caching=true # Whether to automatically bundle the Kotlin standard library (true by default) # https://kotlinlang.org/docs/gradle.html#dependency-on-the-standard-library -kotlin.stdlib.default.dependency=true \ No newline at end of file +kotlin.stdlib.default.dependency=true +kotlin.mpp.import.legacyTestSourceSetDetection=true \ No newline at end of file