NoIssue: A lot of cleanup and generalizations

This commit is contained in:
2026-02-01 11:06:49 +01:00
parent 0e8fba4f6b
commit b85cf0a3de
12 changed files with 217 additions and 16 deletions

View File

@@ -1,5 +1,6 @@
plugins {
id("java")
id("application")
id("maven-publish")
}
@@ -9,6 +10,10 @@ if (version == "UNSET" && gradle.startParameter.taskNames.any { it.startsWith("p
throw GradleException("You must set -Pversion=... (use publish.sh / publishCICD.sh)")
}
application {
mainClass.set("com.r35157.nenjim.kicker.impl.ref.KickerImpl")
}
repositories {
mavenLocal()
@@ -46,6 +51,23 @@ tasks.withType<JavaCompile> {
options.compilerArgs.add("--enable-preview")
}
val dockerLibsDir = layout.buildDirectory.dir("docker/libs")
tasks.register<Sync>("prepareDockerLibs") {
group = "distribution"
description = "Copies all runtime dependencies (transitive) to build/docker/libs"
// Hvis du også vil bygge dit eget jar samtidig, så lad den stå ellers kan du fjerne den.
dependsOn(tasks.named("jar"))
into(dockerLibsDir)
// Kun deps (transitivt)
from(configurations.runtimeClasspath)
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
publishing {
publications {
create<MavenPublication>("mavenJava") {