All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nebula.test.gradle.GradleVersionComparator.groovy Maven / Gradle / Ivy

Go to download

Test harness for Gradle plugins. Hopefully retiring in favor of Gradle TestKit

There is a newer version: 10.6.1
Show newest version
package nebula.test.gradle

import org.gradle.util.GradleVersion

@Category(String)
class GradleVersionComparator {

    boolean versionGreaterThan(String version) {
        return versionCompareTo(this, version) > 0
    }

    boolean versionLessThan(String version) {
        return versionCompareTo(this, version) < 0
    }

    int versionCompareTo(String v1, String v2) {
        return GradleVersion.version(v1).compareTo(GradleVersion.version(v2))
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy