diff --git a/build.gradle b/build.gradle index 8256e83e15..20e2b7f0dd 100644 --- a/build.gradle +++ b/build.gradle @@ -183,7 +183,9 @@ allprojects{ //compile with java 8 compatibility for everything except the annotati project configure(subprojects - project(":annotations")){ tasks.withType(JavaCompile){ - options.release = 8 + if(JavaVersion.current() != JavaVersion.VERSION_1_8){ + options.compilerArgs.addAll(['--release', '8']) + } } tasks.withType(Javadoc){