Open savasimic opened 1 year ago
hi! @savasimic could you create a repo than we can debug on? maybe we introduced some problems when adding kotlin dsl support - did it work on any version for you?
Hi @bgalek ,
here is sample repository with reproduced issue.
I included 2 branches where I'm running currentVersion
task for 1.13.14 and 1.14.4 versions of axion-release plugin:
Hi All, I've the same issue and have created a test here: https://github.com/duschata/axion-release-plugin/blob/main/src/integration/groovy/pl/allegro/tech/build/axion/release/BranchVersionIncrementerTest.groovy
This test will allways fail since version 1.14.0 because the introduction of the @Input annation with this commit: https://github.com/allegro/axion-release-plugin/pull/516
The simple fix is to remove the @Input annotation above
@Optional
abstract MapProperty<String, Object> getBranchVersionIncrementer();
Probably these (and also other) @Input annotations are usesless at this point because the closure is always evalated at configuration time and there is no expensive input/output (writing) task which needs caching,
Is it possible to remove them in 1.15.1? Kind regards, Tom
@duschata nice! thx! Do you want to make a PR and remove unnecessary annotations? I can do it next week probably - and I'll be happy to release new version
@duschata I think the "better" fix would be to use the @Internal
annotation.
@Internal
abstract MapProperty<String, Object> getBranchVersionIncrementer();
This clearly indicates to Gradle that this is something that is not part of the Task input. And it would be consistent with:
@Internal
abstract Property<VersionProperties.Incrementer> getVersionIncrementer()
in the same file.
I think @Optional
can be left out, as it has no real effect on a Map/List (There is always an empty Map/List).
I tried to use different custom incrementers for different branches. When executing task
currentVersion
I was receiving error like:I tried to set
branchVersionIncrementer
with same values like in documentationand got same error
This is happening only when I'm using closures.
Did anyone had similar issue?
Just to note, I'm using gradle 7.5 and version of axion-release-plugin 1.14.4.