fix(autoversion): don't support nullable default due to signature collision
This commit is contained in:
parent
6c964e28ee
commit
711b93913b
@ -53,9 +53,9 @@ fun Project.prop(name: String, default: String): String =
|
|||||||
if (hasProperty(name)) prop(name)
|
if (hasProperty(name)) prop(name)
|
||||||
else default
|
else default
|
||||||
|
|
||||||
fun Project.prop(name: String, default: String?): String? =
|
fun Project.nprop(name: String): String? =
|
||||||
if (hasProperty(name)) prop(name)
|
if (hasProperty(name)) prop(name)
|
||||||
else default
|
else null
|
||||||
|
|
||||||
// Utility to run actions on values
|
// Utility to run actions on values
|
||||||
fun <T> T.runAction(action: Action<T>?): T {
|
fun <T> T.runAction(action: Action<T>?): T {
|
||||||
|
@ -66,7 +66,7 @@ tasks.register("copyVersionNumber", CopyTextTask::class) {
|
|||||||
tasks.register("bumpVersion", BumpVersionTask::class) {
|
tasks.register("bumpVersion", BumpVersionTask::class) {
|
||||||
gitDir = File(projectDir, ".git")
|
gitDir = File(projectDir, ".git")
|
||||||
isRelease = this@Jf_autoversion_gradle.isRelease
|
isRelease = this@Jf_autoversion_gradle.isRelease
|
||||||
nextVersionType = project.provider { prop("nextVersionType", null) }
|
nextVersionType = project.provider { nprop("nextVersionType") }
|
||||||
nextRelease = project.provider { project.nextRelease }
|
nextRelease = project.provider { project.nextRelease }
|
||||||
lastRelease = project.provider { project.lastRelease }
|
lastRelease = project.provider { project.lastRelease }
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user