Skip to content

Commit

Permalink
store backendJar task in variable to access it later
Browse files Browse the repository at this point in the history
  • Loading branch information
stokado committed Dec 16, 2024
1 parent 9e3b08f commit 1e17ee9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fullstack-mpp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ repositories {
mavenCentral()
}

tasks.named<Jar>("backendJar") {
val frontendBrowserProductionWebpack = tasks.named("frontendBrowserProductionWebpack", KotlinWebpack::class).get()
val backendJar = tasks.getByName<Jar>("backendJar") {
val frontendBrowserProductionWebpack = tasks.getByName<KotlinWebpack>("frontendBrowserProductionWebpack")
dependsOn(frontendBrowserProductionWebpack)
from(frontendBrowserProductionWebpack.outputDirectory, frontendBrowserProductionWebpack.mainOutputFileName)
}

tasks.register<JavaExec>("run") {
dependsOn(tasks.named("backendJar"))
dependsOn(backendJar)
mainClass.set("io.ktor.samples.fullstack.backend.BackendCodeKt")
classpath = files(configurations.named("backendRuntimeClasspath").get(), tasks.named("backendJar").get())
args = listOf<String>()
Expand Down

0 comments on commit 1e17ee9

Please sign in to comment.