Skip to content

Commit aee79d1

Browse files
committed
Add dry-run configurable by gradle.properties for jreleaser
These changes will allow us to run workflows on the GitHub CI
1 parent 145fb97 commit aee79d1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

kobweb/build.gradle.kts

+9-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ application {
3636
mainClass.set("MainKt")
3737
}
3838

39+
// Useful for CLI
40+
tasks.register("printVersion") {
41+
doLast {
42+
println(version.toString())
43+
}
44+
}
45+
3946
// We used to minimize this jar, but it kept causing us problems. At our most recent check a minimized jar was 11MB vs.
4047
// 12MB not minimized. It's just not worth the surprising crashes!
4148
// Just in case we decide to minimize again someday, here's what we were doing.
@@ -71,7 +78,8 @@ val (githubUsername, githubToken) = listOf("varabyte.github.username", "varabyte
7178
if (githubUsername != null && githubToken != null) {
7279
// Read about JReleaser at https://jreleaser.org/guide/latest/index.html
7380
jreleaser {
74-
dryrun.set(false) // Specified explicitly for convenience - set dryrun to true when experimenting with values!
81+
val isDryRun = (findProperty("kobweb.cli.jreleaser.dryrun") as? String)?.toBoolean() ?: true
82+
dryrun.set(isDryRun) // Specified explicitly for convenience - set dryrun to true when experimenting with values!
7583
gitRootSearch.set(true)
7684
dependsOnAssemble.set(false) // We pre-assemble ourselves (using shadow jar)
7785

0 commit comments

Comments
 (0)