I want to check in my plugin if a user is using atleast some version of gradle, say 2.1
if (gradleVersionComparator(project.gradle.gradleVersion, "2.1") >= 0) {
// tell the user to upgrade or something
}
I was using something external, but it turns out it doesn’t handle "-"s and "+"s that are in the nightly gradle build version : 2.1-123123+00000
I see there are a bunch of version matchers in “org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy” and I can use
new ExactVersionMatcher().compare("2.0", "2.1")
being an internal thing, is there any expectation that this will continue to work? Or should I just push my own solution?