only 2 problems left: - the `initialVersion` make...
# gradle
s
only 2 problems left: - the
initialVersion
makes problems
Copy code
scmVersion {
    versionIncrementer 'incrementMinor'
    tag {
        initialVersion = { config, position -> '1.0.0' }
    }
    checks {
        aheadOfRemote = false
        uncommittedChanges = false
    }
}
I got
Copy code
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.
I assume it will be something like
Copy code
tag {
    init {
        versionCreator(delegateClosureOf<...> {
            ...
        })
    }
}
!?
latest version is:
Copy code
tag(delegateClosureOf<TagNameSerializationConfig> {
            initialVersion = { rules: TagProperties, position: ScmPosition ->"1.0.0"}
        })
but there is a type mismatch between lambda and closure.
if I check the plugin groovy code there isn’t really a type attached to the closure:
Copy code
Closure initialVersion = defaultInitialVersion()

private static Closure defaultInitialVersion() {
    return { TagProperties rules, ScmPosition position ->
        return '0.1.0'
    }
}
ok, I’m going now with
Copy code
tag(delegateClosureOf<TagNameSerializationConfig> {
    initialVersion = KotlinClosure2<TagProperties, ScmPosition, String>({ _, _ ->"1.0.0"})
})