Enforce Java 8 in Gradle builds
This commit forces builds with Gradle to require at least Java 8. Closes #14499
This commit is contained in:
parent
af3b126a15
commit
faf5f55f41
|
@ -59,6 +59,11 @@ class BuildPlugin implements Plugin<Project> {
|
|||
throw new GradleException('Gradle 2.6 or above is required to build elasticsearch')
|
||||
}
|
||||
|
||||
// enforce Java version
|
||||
if (JavaVersion.current().compareTo(JavaVersion.VERSION_1_8) < 0) {
|
||||
throw new GradleException('Java 8 or above is required to build Elasticsearch')
|
||||
}
|
||||
|
||||
// Build debugging info
|
||||
println '======================================='
|
||||
println 'Elasticsearch Build Hamster says Hello!'
|
||||
|
|
Loading…
Reference in New Issue