Skip to content

Commit

Permalink
Fix running programs from jvmDemo with Kotlin 1.9.10 plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
edwinRNDR committed Oct 11, 2023
1 parent 96a14c1 commit 307df63
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,13 @@ if (shouldPublish) {
setRequired({ isReleaseVersion && gradle.taskGraph.hasTask("publish") })
sign(publishing.publications)
}
}
}

kotlin {
jvm().mainRun {
classpath(kotlin.jvm().compilations.getByName("demo").output.allOutputs)
classpath(kotlin.jvm().compilations.getByName("demo").configurations.runtimeDependencyConfiguration!!)
}
}

tasks.withType<JavaExec>().matching { it.name == "jvmRun" }.configureEach { workingDir = rootDir }
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
kotlin.stdlib.default.dependency=true
kotlin.mpp.import.legacyTestSourceSetDetection=true

0 comments on commit 307df63

Please sign in to comment.