allegro / allegro/axion-release-plugin

VersionProperties.Incrementer in Kotlin != groovy.lang.Closure

未關閉
#622 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Groovy
星號
641
分支
165
平均合併
49 分鐘
30 天內合併 PR
9

描述

Hallo All,

working with the just fixed #590 issue. I run into the next problem using kotlin dsl.

Have a look at the failing test here:

https://github.com/duschata/axion-release-plugin/blob/mcve_kotlin_closure/src/integration/groovy/pl/allegro/tech/build/axion/release/KotlinDslCompatibilityTests.groovy#L89

Kotlin needs a strong typed VersionProperties.Incrementer here, but the condition in the VersionPropertiesFactory

https://github.com/duschata/axion-release-plugin/blob/mcve_kotlin_closure/src/main/groovy/pl/allegro/tech/build/axion/release/infrastructure/config/VersionPropertiesFactory.groovy#L68-L74

evaluates a (!)Closure and the kotlin lambda runs always into the wrong condition.

What can we do there,

* using a kind of closureOf function in the kotlin script?
* fix the (!(value instanceof Closure))?

what do you think?

kind regards, Tom

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。