fix(autoversion): don't support nullable default due to signature collision
All checks were successful
ci/woodpecker/push/gradle Pipeline was successful
ci/woodpecker/push/pages Pipeline was successful

This commit is contained in:
Johannes Frohnmeyer 2024-05-26 11:41:01 +02:00
parent 6c964e28ee
commit 711b93913b
Signed by: Johannes
GPG Key ID: E76429612C2929F4
2 changed files with 3 additions and 3 deletions

View File

@ -53,9 +53,9 @@ fun Project.prop(name: String, default: String): String =
if (hasProperty(name)) prop(name)
else default
fun Project.prop(name: String, default: String?): String? =
fun Project.nprop(name: String): String? =
if (hasProperty(name)) prop(name)
else default
else null
// Utility to run actions on values
fun <T> T.runAction(action: Action<T>?): T {

View File

@ -66,7 +66,7 @@ tasks.register("copyVersionNumber", CopyTextTask::class) {
tasks.register("bumpVersion", BumpVersionTask::class) {
gitDir = File(projectDir, ".git")
isRelease = this@Jf_autoversion_gradle.isRelease
nextVersionType = project.provider { prop("nextVersionType", null) }
nextVersionType = project.provider { nprop("nextVersionType") }
nextRelease = project.provider { project.nextRelease }
lastRelease = project.provider { project.lastRelease }
}