From 638383dc44bc34908839e7e37b9aca166cd34dd0 Mon Sep 17 00:00:00 2001 From: Alpar Torok Date: Mon, 21 May 2018 09:42:58 +0300 Subject: [PATCH] disable annotation processor for docs (#30610) * disable annotation processor for docs Could not find evidence that the log4j annotation processor is used. The compiler flag enables the Gradle 5.0 behavior Closes #30476 * Disable annotation processors for all tests * remove redundant `-proc:none` already handled by required plugins * Revert unintentional changes --- .../elasticsearch/gradle/test/StandaloneTestPlugin.groovy | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/StandaloneTestPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/StandaloneTestPlugin.groovy index de52d75c600..5eec829dfa1 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/StandaloneTestPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/StandaloneTestPlugin.groovy @@ -24,6 +24,7 @@ import org.elasticsearch.gradle.BuildPlugin import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.api.plugins.JavaBasePlugin +import org.gradle.api.tasks.compile.JavaCompile /** * Configures the build to compile against Elasticsearch's test framework and @@ -49,5 +50,12 @@ public class StandaloneTestPlugin implements Plugin { test.testClassesDir project.sourceSets.test.output.classesDir test.mustRunAfter(project.precommit) project.check.dependsOn(test) + + project.tasks.withType(JavaCompile) { + // This will be the default in Gradle 5.0 + if (options.compilerArgs.contains("-processor") == false) { + options.compilerArgs << '-proc:none' + } + } } }