axion-release-plugin icon indicating copy to clipboard operation
axion-release-plugin copied to clipboard

Configuring versionIncrementer is cumbersome in Kotlin DSL

Open radoslaw-panuszewski opened this issue 1 year ago • 0 comments

Expected behavior

scmVersion {
    versionIncrementer = PredefinedVersionCreator.INCREMENT_MINOR.versionIncrementer
}

Current behavior

scmVersion {
    versionIncrementer = VersionProperties.Incrementer { it.currentVersion.incrementMinorVersion() }
}

Context

There are 2 interfaces: PredefinedVersionIncrementer.VersionIncrementer and VersionProperties.Incrementer. The latter is exposed to DSL via VersionConfig.getVersionIncrementer() but PredefinedVersionIncrementer implements the former.

The similar config versionCreator has only one interface VersionProperties.Creator and PredefinedVersionCreator implements it. We should do it the same way for versionIncrementer.

radoslaw-panuszewski avatar Oct 15 '24 13:10 radoslaw-panuszewski