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 4, 2024
1 parent 5f9f7cd commit 5c0701e
Showing 1 changed file with 34 additions and 6 deletions.
40 changes: 34 additions & 6 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,9 +14,9 @@ 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"
id("org.jreleaser") version "1.15.0"
}

val versionProperties = Properties().apply {
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,11 +82,20 @@ 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> {
useJUnitPlatform()
maxHeapSize = "5g" // Set the desired maximum heap size
Expand Down Expand Up @@ -193,8 +208,21 @@ jreleaser {
}
}

tasks.named("distZip"){
enabled = false
}

tasks.named("distTar"){
enabled = false
}

tasks.named("jreleaserRelease") {
dependsOn("shadowDistZip")
dependsOn("shadowDistTar")
}

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

0 comments on commit 5c0701e

Please sign in to comment.