Consider depending on org.gradle.util.GradleVersion when it becomes public
benjamin-bader opened this issue · 4 comments
We have our own GradleVersion class because org.gradle.util.GradleVersion
is technically an internal API. According to gradle/gradle#4884, this is slated to be made a public API in Gradle 6.6.
If/when that happens, let's evaluate whether we can use it. As long as its public API remains compatible with its current internal one, we'll be good to depend on it.
Why not use VersionNumber
and just parse the gradle version string with that?
I don't remember if I ever knew about that class before, but it's news to me now!
It does seem to be public, which is nice. I'll look at whether it's applicable here. Thanks for the pointer!
Ah, right. It's deprecated, naturally:
https://github.com/gradle/gradle/blob/master/subprojects/core/src/main/java/org/gradle/util/VersionNumber.java#L27
Somehow when I left that comment, I missed that on April 13 Gradle did in fact make GradleVersion
public: gradle/gradle#16809
Let's see what we can do here :)