Skip to content

Commit 2ddade8

Browse files
Simplify JReleaser config
Instead of jar + installDist tasks (with custom patterns) now we provide archive produced by the distZip task as a single input to jlink
1 parent 15dd19a commit 2ddade8

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

build-logic/cli-distribution/src/main/kotlin/conventions/cli-distribution.gradle.kts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,8 @@ jreleaser {
4545
jdk {
4646
path = Jvm.current().javaHome
4747
}
48-
mainJar {
49-
path = tasks.jar.flatMap { it.archiveFile }
50-
}
51-
jars {
52-
pattern = tasks.installDist
53-
.map { it.destinationDir }
54-
.map { it.resolve("lib").absolutePath + "/*" }
48+
javaArchive {
49+
path = tasks.distZip.flatMap { it.archiveFile }.map { it.asFile.absolutePath }
5550
}
5651
moduleNames.addAll(
5752
"java.base",
@@ -113,7 +108,7 @@ jreleaser {
113108

114109
tasks {
115110
jreleaserAssemble {
116-
dependsOn(jar, installDist, rootProject.tasks["provisionJdks"])
111+
dependsOn(distZip, rootProject.tasks["provisionJdks"])
117112
}
118113

119114
withType<AbstractJReleaserTask> {

0 commit comments

Comments
 (0)