From a9a9598e02ac6edb27bd4940196a2e27a78d7288 Mon Sep 17 00:00:00 2001 From: Alpar Torok Date: Fri, 20 Jul 2018 05:20:35 +0000 Subject: [PATCH] Require Gradle 4.9 as minimum version (#32200) Do the check in the build plugin as well to be more informative to users of build-tools. We use APIs specific to Gradle 4.9 so earlier will not work. --- buildSrc/build.gradle | 4 ++-- .../main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index eb95ff148f6..55520728812 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -25,8 +25,8 @@ plugins { group = 'org.elasticsearch.gradle' -if (GradleVersion.current() < GradleVersion.version('3.3')) { - throw new GradleException('Gradle 3.3+ is required to build elasticsearch') +if (GradleVersion.current() < GradleVersion.version('4.9')) { + throw new GradleException('Gradle 4.9+ is required to build elasticsearch') } if (JavaVersion.current() < JavaVersion.VERSION_1_8) { diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy index c5dd19de3cc..9f54ae8b682 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy @@ -67,6 +67,9 @@ class BuildPlugin implements Plugin { + 'elasticearch.standalone-rest-test, and elasticsearch.build ' + 'are mutually exclusive') } + if (GradleVersion.current() < GradleVersion.version('4.9')) { + throw new GradleException('Gradle 4.9+ is required to use elasticsearch.build plugin') + } project.pluginManager.apply('java') project.pluginManager.apply('carrotsearch.randomized-testing') // these plugins add lots of info to our jars