Skip to content

Commit

Permalink
use shadowjar distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
cwensel committed Nov 3, 2024
1 parent 5f9f7cd commit 6316ff3
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jreleaser.model.Active
import org.jreleaser.model.Distribution
import org.jreleaser.model.Stereotype
Expand All @@ -13,7 +14,7 @@ import java.util.*
*/

plugins {
id("com.github.johnrengelman.shadow") version "8.1.1"
id("com.gradleup.shadow") version "8.3.5"
id("io.micronaut.application") version "4.4.3"
id("org.jreleaser") version "1.14.0"
}
Expand Down Expand Up @@ -65,6 +66,11 @@ dependencies {
implementation("ch.qos.logback:logback-classic:1.5.11")
}

java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

application {
applicationName = "subpop"
mainClass = "io.clusterless.subpop.Main"
Expand All @@ -76,9 +82,16 @@ distributions {
}
}

java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
tasks.withType<ShadowJar>{
archiveBaseName.set("subpop")
}

tasks.named<Zip>("shadowDistZip") {
archiveBaseName.set("subpop")
}

tasks.named<Tar>("shadowDistTar") {
archiveBaseName.set("subpop")
}

tasks.withType<Test> {
Expand Down Expand Up @@ -194,7 +207,7 @@ jreleaser {
}

tasks.register("release") {
dependsOn("distZip")
dependsOn("shadowDistZip")
dependsOn("jreleaserRelease")
dependsOn("jreleaserPackage")
dependsOn("jreleaserPublish")
Expand Down

0 comments on commit 6316ff3

Please sign in to comment.