From e91fd0969285829ad3f9c474e4e15d73c3e36ff0 Mon Sep 17 00:00:00 2001 From: Yannick Welsch Date: Tue, 15 Mar 2016 15:03:37 +0100 Subject: [PATCH] Enable jdk-system-out Forbidden API checks on test sources --- .../org/elasticsearch/gradle/precommit/PrecommitTasks.groovy | 3 +-- test/build.gradle | 1 - test/framework/build.gradle | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) 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 cbd72f2c7da..0d4a51f050a 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/PrecommitTasks.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/PrecommitTasks.groovy @@ -64,7 +64,7 @@ class PrecommitTasks { project.forbiddenApis { internalRuntimeForbidden = true failOnUnsupportedJava = false - bundledSignatures = ['jdk-unsafe', 'jdk-deprecated'] + bundledSignatures = ['jdk-unsafe', 'jdk-deprecated', 'jdk-system-out'] signaturesURLs = [getClass().getResource('/forbidden/jdk-signatures.txt'), getClass().getResource('/forbidden/es-all-signatures.txt')] suppressAnnotations = ['**.SuppressForbidden'] @@ -72,7 +72,6 @@ class PrecommitTasks { Task mainForbidden = project.tasks.findByName('forbiddenApisMain') if (mainForbidden != null) { mainForbidden.configure { - bundledSignatures += 'jdk-system-out' signaturesURLs += getClass().getResource('/forbidden/es-core-signatures.txt') } } diff --git a/test/build.gradle b/test/build.gradle index fcf4f5bb761..7feb332b717 100644 --- a/test/build.gradle +++ b/test/build.gradle @@ -29,7 +29,6 @@ subprojects { // the main files are actually test files, so use the appropriate forbidden api sigs forbiddenApisMain { - bundledSignatures = ['jdk-unsafe', 'jdk-deprecated'] signaturesURLs = [PrecommitTasks.getResource('/forbidden/jdk-signatures.txt'), PrecommitTasks.getResource('/forbidden/es-signatures.txt'), PrecommitTasks.getResource('/forbidden/es-test-signatures.txt')] diff --git a/test/framework/build.gradle b/test/framework/build.gradle index 8ee5fbfe81a..af65c9ff7c9 100644 --- a/test/framework/build.gradle +++ b/test/framework/build.gradle @@ -38,7 +38,6 @@ compileTestJava.options.compilerArgs << '-Xlint:-rawtypes' // the main files are actually test files, so use the appropriate forbidden api sigs forbiddenApisMain { - bundledSignatures = ['jdk-unsafe', 'jdk-deprecated'] signaturesURLs = [PrecommitTasks.getResource('/forbidden/all-signatures.txt'), PrecommitTasks.getResource('/forbidden/test-signatures.txt')] }