Move up task creation and add Main-Class
This commit is contained in:
parent
ef7649d920
commit
0c27b1ccd8
|
|
@ -33,6 +33,17 @@ tasks {
|
||||||
options.encoding = Charsets.UTF_8.name()
|
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 {
|
shadowJar {
|
||||||
dependsOn(getByName("relocateJars") as ConfigureShadowRelocation)
|
dependsOn(getByName("relocateJars") as ConfigureShadowRelocation)
|
||||||
archiveFileName.set("${project.name}-${project.version}.jar")
|
archiveFileName.set("${project.name}-${project.version}.jar")
|
||||||
|
|
@ -44,10 +55,6 @@ tasks {
|
||||||
dependsOn(shadowJar)
|
dependsOn(shadowJar)
|
||||||
}
|
}
|
||||||
|
|
||||||
create<ConfigureShadowRelocation>("relocateJars") {
|
|
||||||
target = shadowJar.get()
|
|
||||||
prefix = "${project.name}.lib"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user