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.
This commit is contained in:
Ryan Ernst 2020-05-07 19:02:02 -07:00 committed by Ryan Ernst
parent 13944b1bf9
commit 582145a493
No known key found for this signature in database
GPG Key ID: 5F7EA39E15F54DCE
2 changed files with 4 additions and 4 deletions

View File

@ -116,7 +116,7 @@ dependencies {
compile 'org.apache.rat:apache-rat:0.11' compile 'org.apache.rat:apache-rat:0.11'
compile "org.elasticsearch:jna:4.5.1" compile "org.elasticsearch:jna:4.5.1"
compile 'com.github.jengelman.gradle.plugins:shadow:5.1.0' 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 'com.avast.gradle:gradle-docker-compose-plugin:0.8.12'
compile 'org.apache.maven:maven-model:3.6.2' compile 'org.apache.maven:maven-model:3.6.2'
compile 'com.networknt:json-schema-validator:1.0.36' compile 'com.networknt:json-schema-validator:1.0.36'

View File

@ -168,9 +168,9 @@ class PrecommitTasks {
classpath = project.files { sourceSet.runtimeClasspath.plus(sourceSet.compileClasspath) } classpath = project.files { sourceSet.runtimeClasspath.plus(sourceSet.compileClasspath) }
targetCompatibility = BuildParams.runtimeJavaVersion.majorVersion targetCompatibility = BuildParams.runtimeJavaVersion.majorVersion
if (BuildParams.runtimeJavaVersion > JavaVersion.VERSION_13) { if (BuildParams.runtimeJavaVersion > JavaVersion.VERSION_14) {
// forbidden apis does not yet support java 14 (it will in version 3.0), so we must use java 13 target // TODO: forbidden apis does not yet support java 15, rethink using runtime version
targetCompatibility = JavaVersion.VERSION_13.majorVersion targetCompatibility = JavaVersion.VERSION_14.majorVersion
} }
bundledSignatures = [ bundledSignatures = [
"jdk-unsafe", "jdk-deprecated", "jdk-non-portable", "jdk-system-out" "jdk-unsafe", "jdk-deprecated", "jdk-non-portable", "jdk-system-out"