Closed JavierSegoviaCordoba closed 3 years ago
I don't believe there's anything I can do to fix that. Many Gradle plugins rely on using project.version for setting conventional values in other parts of the model.
Gradle exposed the version as an Object value, which is how reckon hooks in and delays resolution until the version property is used. Eagerly evaluating the version is a won't fix for me.
I don't know how the Jetbrains plugin works, but until Gradle changes how project.version works they should be calling toString on the version.
Yeah, I checked the Changelog plugin and I did a PR changing the type from String
to Any
, hope they accept it.
As a local workaround I am using this:
import org.jetbrains.changelog.closure
import org.jetbrains.changelog.date
// Workaround to fix: https://github.com/JetBrains/gradle-changelog-plugin/issues/26
// When it is fixed, remove `projectVersion` variable and `project.version = ...` assignments
val projectVersion = project.version
project.version = "$projectVersion"
plugins {
id("org.jetbrains.changelog")
}
project.version = projectVersion
changelog {
version = "${project.version}"
header = closure { "[$version] - ${date()}" }
keepUnreleasedSection = true
unreleasedTerm = "[Unreleased]"
groups = listOf("Added", "Changed", "Deprecated", "Removed", "Fixed", "Updated")
}
Is there any way to force reckon to use
project.version
asString
?