NoIssue: Fix for correct main class
This commit is contained in:
@@ -11,7 +11,7 @@ if (version == "UNSET" && gradle.startParameter.taskNames.any { it.startsWith("p
|
|||||||
}
|
}
|
||||||
|
|
||||||
application {
|
application {
|
||||||
mainClass.set("com.r35157.nenjim.kicker.impl.ref.KickerImpl")
|
mainClass.set("com.r35157.nenjim.kicker.impl.ref.Main")
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@@ -51,20 +51,25 @@ tasks.withType<JavaCompile> {
|
|||||||
options.compilerArgs.add("--enable-preview")
|
options.compilerArgs.add("--enable-preview")
|
||||||
}
|
}
|
||||||
|
|
||||||
val dockerLibsDir = layout.buildDirectory.dir("docker/libs")
|
val libsDir = layout.buildDirectory.dir("libs")
|
||||||
|
|
||||||
tasks.register<Sync>("prepareDockerLibs") {
|
tasks.register<Sync>("prepareLibs") {
|
||||||
group = "distribution"
|
group = "distribution"
|
||||||
description = "Copies all runtime dependencies (transitive) to build/docker/libs"
|
description = "Copies runtime deps to build/libs without deleting the app jar"
|
||||||
|
|
||||||
// Hvis du også vil bygge dit eget jar samtidig, så lad den stå – ellers kan du fjerne den.
|
val jarTask = tasks.named<Jar>("jar")
|
||||||
dependsOn(tasks.named("jar"))
|
dependsOn(jarTask)
|
||||||
|
|
||||||
into(dockerLibsDir)
|
into(libsDir)
|
||||||
|
|
||||||
// Kun deps (transitivt)
|
// Kun deps (transitivt)
|
||||||
from(configurations.runtimeClasspath)
|
from(configurations.runtimeClasspath)
|
||||||
|
|
||||||
|
// Bevar jar-filen som jar-tasken allerede har lagt i build/libs
|
||||||
|
preserve {
|
||||||
|
include(jarTask.get().archiveFileName.get())
|
||||||
|
}
|
||||||
|
|
||||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user