Skip to content

Commit 76d0093

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 691ee6d commit 76d0093

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
@@ -152,9 +152,9 @@ class PrecommitTasks {
152152
project.tasks.withType(CheckForbiddenApis).configureEach {
153153
dependsOn(buildResources)
154154
targetCompatibility = BuildParams.runtimeJavaVersion.majorVersion
155-
if (BuildParams.runtimeJavaVersion > JavaVersion.VERSION_13) {
156-
// forbidden apis does not yet support java 14 (it will in version 3.0), so we must use java 13 target
157-
targetCompatibility = JavaVersion.VERSION_13.majorVersion
155+
if (BuildParams.runtimeJavaVersion > JavaVersion.VERSION_14) {
156+
// TODO: forbidden apis does not yet support java 15, rethink using runtime version
157+
targetCompatibility = JavaVersion.VERSION_14.majorVersion
158158
}
159159
bundledSignatures = [
160160
"jdk-unsafe", "jdk-deprecated", "jdk-non-portable", "jdk-system-out"

0 commit comments

Comments
 (0)