Skip to content

Commit 4b9cb05

Browse files
committed
Upgrade forbidden apis to 3.0 (#56368)
This commit upgrades forbidden apis to the latest version, which also means we now get task configuration avoidance.
1 parent 4a73f67 commit 4b9cb05

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

buildSrc/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ dependencies {
116116
compile 'org.apache.rat:apache-rat:0.11'
117117
compile "org.elasticsearch:jna:4.5.1"
118118
compile 'com.github.jengelman.gradle.plugins:shadow:5.1.0'
119-
compile 'de.thetaphi:forbiddenapis:2.7'
119+
compile 'de.thetaphi:forbiddenapis:3.0'
120120
compile 'com.avast.gradle:gradle-docker-compose-plugin:0.8.12'
121121
compile 'org.apache.maven:maven-model:3.6.2'
122122
compile 'com.networknt:json-schema-validator:1.0.36'

buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/PrecommitTasks.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ class PrecommitTasks {
168168
classpath = project.files { sourceSet.runtimeClasspath.plus(sourceSet.compileClasspath) }
169169

170170
targetCompatibility = BuildParams.runtimeJavaVersion.majorVersion
171-
if (BuildParams.runtimeJavaVersion > JavaVersion.VERSION_13) {
172-
// forbidden apis does not yet support java 14 (it will in version 3.0), so we must use java 13 target
173-
targetCompatibility = JavaVersion.VERSION_13.majorVersion
171+
if (BuildParams.runtimeJavaVersion > JavaVersion.VERSION_14) {
172+
// TODO: forbidden apis does not yet support java 15, rethink using runtime version
173+
targetCompatibility = JavaVersion.VERSION_14.majorVersion
174174
}
175175
bundledSignatures = [
176176
"jdk-unsafe", "jdk-deprecated", "jdk-non-portable", "jdk-system-out"

0 commit comments

Comments
 (0)