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:
Jason Tedor 2015-11-06 11:38:25 -05:00
parent af3b126a15
commit faf5f55f41
1 changed files with 5 additions and 0 deletions

View File

@ -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!'