diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index ba64a9c0a9a..9cd6ab122a4 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -116,7 +116,7 @@ dependencies { compile 'org.apache.rat:apache-rat:0.11' compile "org.elasticsearch:jna:4.5.1" compile 'com.github.jengelman.gradle.plugins:shadow:5.1.0' - compile 'de.thetaphi:forbiddenapis:2.7' + compile 'de.thetaphi:forbiddenapis:3.0' compile 'com.avast.gradle:gradle-docker-compose-plugin:0.8.12' compile 'org.apache.maven:maven-model:3.6.2' compile 'com.networknt:json-schema-validator:1.0.36' diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/PrecommitTasks.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/PrecommitTasks.groovy index d1e544fbd5c..3ce2454181f 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/PrecommitTasks.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/PrecommitTasks.groovy @@ -168,9 +168,9 @@ class PrecommitTasks { classpath = project.files { sourceSet.runtimeClasspath.plus(sourceSet.compileClasspath) } targetCompatibility = BuildParams.runtimeJavaVersion.majorVersion - if (BuildParams.runtimeJavaVersion > JavaVersion.VERSION_13) { - // forbidden apis does not yet support java 14 (it will in version 3.0), so we must use java 13 target - targetCompatibility = JavaVersion.VERSION_13.majorVersion + if (BuildParams.runtimeJavaVersion > JavaVersion.VERSION_14) { + // TODO: forbidden apis does not yet support java 15, rethink using runtime version + targetCompatibility = JavaVersion.VERSION_14.majorVersion } bundledSignatures = [ "jdk-unsafe", "jdk-deprecated", "jdk-non-portable", "jdk-system-out"