Javi
01/10/2025, 3:05 PMProject::version
not only becomes Property
, but it becomes Property<GradleVersion>
instead of Property<String>
.
And GradleVersion
providing nice APIs for ordering, being able to check if a version is valid without catching exceptions, and so on.
I think it is a common pattern used by multiple open-source semver plugins that have their own internal implementations of GradleVersion, but in the end, all companies of all sizes would benefit from this too.Chris Lee
01/10/2025, 3:07 PMProperty
would be helpful. Its doubtful that GradleVersion
would happen - there are so many variations on what Gradle users use for versions, wouldn’t be practical to have a one-size-fits-all.Javi
01/10/2025, 3:09 PMGradleVersion
would help those libraries to catch errors with ordering and others.Chris Lee
01/10/2025, 3:11 PMJavi
01/10/2025, 3:14 PMGradleVersion
is not enough flexible? I haven't checked it deeply, but I think it would fit SemVer and Calendar versioning which would the two most used approaches.
Anyway, I think the Project::version
is highly coupled to the fact it is done for Maven, so limiting it wouldn't be a problem and other plugins could do what Android Gradle Plugin does, that is having its own versioning inside its extension.Chris Lee
01/10/2025, 3:17 PMJavi
01/10/2025, 3:19 PMChris Lee
01/10/2025, 3:20 PMChris Lee
01/10/2025, 3:24 PMJavi
01/10/2025, 3:24 PMGradleVersion
.
I have checked the Swift docs but it is not adding external dependencies... I will look for more samplesJavi
01/10/2025, 3:25 PM