Open santbob opened 3 years ago
@santbob
I ran into a similar issue. I was able to solve it using the KotlinClosure2
, which creates a Groovy closure that provides 2 parameters. I prefer to auto-increment the minor version automatically instead of the patch version, as most of my releases contain new features. Below is my release plugin configuration when running ./gradlew clean release -Prelease.useAutomaticVersion=true
release {
versionPatterns = mapOf(
// Increments 1.1.1 to 1.2.0-SNAPSHOT
"""[.]*\.(\d+)\.(\d+)[.]*""" to KotlinClosure2<Matcher, Project, String>({ matcher, project ->
matcher.replaceAll(".${(matcher.group(0)[1]) + 1}.0")
})
)
git {
requireBranch = ""
pushToRemote = "origin"
}
}
One of our projects is using Kotlin DSL instead of Groovy-based syntax and our Jenkins Paved path setup uses this release plugin. I need a way to convert
to a compatible Kotlin DSL version.
please suggest how to go about it.