From b0c70650007221e7465ba8207d71100e9e9637a3 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Fri, 6 Nov 2015 12:28:31 -0500 Subject: [PATCH] Cleaner version check --- .../src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy index 3cf912d0fd3..65b6fcc4974 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy @@ -60,7 +60,7 @@ class BuildPlugin implements Plugin { } // 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') }