Stephan Schroeder
06/26/2019, 3:33 PMinitialVersion
makes problems
scmVersion {
versionIncrementer 'incrementMinor'
tag {
initialVersion = { config, position -> '1.0.0' }
}
checks {
aheadOfRemote = false
uncommittedChanges = false
}
}
I got
tasks {
scmVersion {
versionIncrementer("incrementMinor")
tag {
initialVersion = { config, position -> "1.0.0" }
}
checks(delegateClosureOf<ChecksConfig> {
aheadOfRemote = false
uncommittedChanges = false
})
}
}
but there is no longer an initialVersion
available, closest thing is maybe init{versionCreator{...
this wants some closure.tag {
init {
versionCreator(delegateClosureOf<...> {
...
})
}
}
!?tag(delegateClosureOf<TagNameSerializationConfig> {
initialVersion = { rules: TagProperties, position: ScmPosition ->"1.0.0"}
})
but there is a type mismatch between lambda and closure.Closure initialVersion = defaultInitialVersion()
private static Closure defaultInitialVersion() {
return { TagProperties rules, ScmPosition position ->
return '0.1.0'
}
}
tag(delegateClosureOf<TagNameSerializationConfig> {
initialVersion = KotlinClosure2<TagProperties, ScmPosition, String>({ _, _ ->"1.0.0"})
})