Closed bric3 closed 6 months ago
Using the version providers introduced in JavierSegoviaCordoba/semver-gradle-plugin#93
I wonder if I'm using it right. Suppose the following task that emit the version 0.0.1-SNAPSHOT
./gradlew publish -Psemver.stage=snapshot
This call return false, because the comparison is performing an equality on the String representation of the version.
false
String
public val String.isSnapshot: Boolean get() = lowercase() == SpecialStage.snapshot
I was able to work around this with my own provider
val isSnapshot = providers.provider { GradleVersion(project.version.toString()).isSnapshot }
Gradle : 8.7 Semver : 0.5.0
I will check, I think there is a lazy version too, but you need to cast the version.
version
Thank you for the report!
Fixed here: https://github.com/JavierSegoviaCordoba/semver-gradle-plugin/commit/e733267ecb8f5fdfa02d1179d207cd175221c4fd
Thanks
Using the version providers introduced in JavierSegoviaCordoba/semver-gradle-plugin#93
I wonder if I'm using it right. Suppose the following task that emit the version 0.0.1-SNAPSHOT
This call return
false
, because the comparison is performing an equality on theString
representation of the version.I was able to work around this with my own provider
Gradle : 8.7 Semver : 0.5.0