Cleaner version check

This commit is contained in:
Jason Tedor 2015-11-06 12:28:31 -05:00
parent faf5f55f41
commit b0c7065000
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ class BuildPlugin implements Plugin<Project> {
}
// enforce Java version
if (JavaVersion.current().compareTo(JavaVersion.VERSION_1_8) < 0) {
if (!JavaVersion.current().isJava8Compatible()) {
throw new GradleException('Java 8 or above is required to build Elasticsearch')
}