From 89cd1cc2a02c70665245c6bd65ed69600e05c0c6 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Tue, 20 Mar 2018 13:38:52 -0400 Subject: [PATCH] Require JDK 10 to build Elasticsearch This commit bumps the minimum compiler version required to build Elasticsearch from JDK 9 to JDK 10. --- CONTRIBUTING.md | 6 +++--- .../main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2617baadba013..69e90473a7f61 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -92,11 +92,11 @@ Contributing to the Elasticsearch codebase **Repository:** [https://github.com/elastic/elasticsearch](https://github.com/elastic/elasticsearch) -JDK 9 is required to build Elasticsearch. You must have a JDK 9 installation +JDK 10 is required to build Elasticsearch. You must have a JDK 10 installation with the environment variable `JAVA_HOME` referencing the path to Java home for -your JDK 9 installation. By default, tests use the same runtime as `JAVA_HOME`. +your JDK 10 installation. By default, tests use the same runtime as `JAVA_HOME`. However, since Elasticsearch, supports JDK 8 the build supports compiling with -JDK 9 and testing on a JDK 8 runtime; to do this, set `RUNTIME_JAVA_HOME` +JDK 10 and testing on a JDK 8 runtime; to do this, set `RUNTIME_JAVA_HOME` pointing to the Java home of a JDK 8 installation. Note that this mechanism can be used to test against other JDKs as well, this is not only limited to JDK 8. diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy index 6043ce210906a..58b2ce62bec0a 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy @@ -58,7 +58,7 @@ import java.time.ZonedDateTime class BuildPlugin implements Plugin { static final JavaVersion minimumRuntimeVersion = JavaVersion.VERSION_1_8 - static final JavaVersion minimumCompilerVersion = JavaVersion.VERSION_1_9 + static final JavaVersion minimumCompilerVersion = JavaVersion.VERSION_1_10 @Override void apply(Project project) {