Skip to content

Commit 6316ff3

Browse files
committed
use shadowjar distribution
1 parent 5f9f7cd commit 6316ff3

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

build.gradle.kts

+18-5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
12
import org.jreleaser.model.Active
23
import org.jreleaser.model.Distribution
34
import org.jreleaser.model.Stereotype
@@ -13,7 +14,7 @@ import java.util.*
1314
*/
1415

1516
plugins {
16-
id("com.github.johnrengelman.shadow") version "8.1.1"
17+
id("com.gradleup.shadow") version "8.3.5"
1718
id("io.micronaut.application") version "4.4.3"
1819
id("org.jreleaser") version "1.14.0"
1920
}
@@ -65,6 +66,11 @@ dependencies {
6566
implementation("ch.qos.logback:logback-classic:1.5.11")
6667
}
6768

69+
java {
70+
sourceCompatibility = JavaVersion.VERSION_21
71+
targetCompatibility = JavaVersion.VERSION_21
72+
}
73+
6874
application {
6975
applicationName = "subpop"
7076
mainClass = "io.clusterless.subpop.Main"
@@ -76,9 +82,16 @@ distributions {
7682
}
7783
}
7884

79-
java {
80-
sourceCompatibility = JavaVersion.VERSION_21
81-
targetCompatibility = JavaVersion.VERSION_21
85+
tasks.withType<ShadowJar>{
86+
archiveBaseName.set("subpop")
87+
}
88+
89+
tasks.named<Zip>("shadowDistZip") {
90+
archiveBaseName.set("subpop")
91+
}
92+
93+
tasks.named<Tar>("shadowDistTar") {
94+
archiveBaseName.set("subpop")
8295
}
8396

8497
tasks.withType<Test> {
@@ -194,7 +207,7 @@ jreleaser {
194207
}
195208

196209
tasks.register("release") {
197-
dependsOn("distZip")
210+
dependsOn("shadowDistZip")
198211
dependsOn("jreleaserRelease")
199212
dependsOn("jreleaserPackage")
200213
dependsOn("jreleaserPublish")

0 commit comments

Comments
 (0)