Move up task creation and add Main-Class

This commit is contained in:
destro174 2022-04-08 20:18:36 +02:00
parent ef7649d920
commit 0c27b1ccd8

View File

@ -33,6 +33,17 @@ tasks {
options.encoding = Charsets.UTF_8.name()
}
withType<Jar> {
manifest {
attributes["Main-Class"] = "${rootProject.group}.${project.name}"
}
}
create<ConfigureShadowRelocation>("relocateJars") {
target = shadowJar.get()
prefix = "${project.name}.lib"
}
shadowJar {
dependsOn(getByName("relocateJars") as ConfigureShadowRelocation)
archiveFileName.set("${project.name}-${project.version}.jar")
@ -44,10 +55,6 @@ tasks {
dependsOn(shadowJar)
}
create<ConfigureShadowRelocation>("relocateJars") {
target = shadowJar.get()
prefix = "${project.name}.lib"
}
}
dependencies {