Skip to content

Commit

Permalink
Upgrade forbidden apis to 3.0 (#56368)
Browse files Browse the repository at this point in the history
This commit upgrades forbidden apis to the latest version, which also
means we now get task configuration avoidance.
  • Loading branch information
rjernst committed May 8, 2020
1 parent 691ee6d commit 76d0093
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ class PrecommitTasks {
project.tasks.withType(CheckForbiddenApis).configureEach {
dependsOn(buildResources)
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"
Expand Down

0 comments on commit 76d0093

Please sign in to comment.