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.
This commit is contained in:
Alpar Torok 2018-07-20 05:20:35 +00:00 committed by GitHub
parent 6f2b7dc9fe
commit a9a9598e02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -25,8 +25,8 @@ plugins {
group = 'org.elasticsearch.gradle' group = 'org.elasticsearch.gradle'
if (GradleVersion.current() < GradleVersion.version('3.3')) { if (GradleVersion.current() < GradleVersion.version('4.9')) {
throw new GradleException('Gradle 3.3+ is required to build elasticsearch') throw new GradleException('Gradle 4.9+ is required to build elasticsearch')
} }
if (JavaVersion.current() < JavaVersion.VERSION_1_8) { if (JavaVersion.current() < JavaVersion.VERSION_1_8) {

View File

@ -67,6 +67,9 @@ class BuildPlugin implements Plugin<Project> {
+ 'elasticearch.standalone-rest-test, and elasticsearch.build ' + 'elasticearch.standalone-rest-test, and elasticsearch.build '
+ 'are mutually exclusive') + '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('java')
project.pluginManager.apply('carrotsearch.randomized-testing') project.pluginManager.apply('carrotsearch.randomized-testing')
// these plugins add lots of info to our jars // these plugins add lots of info to our jars