From 178204703a33387139bce834a7c592292a40553e Mon Sep 17 00:00:00 2001 From: Mark Vieira Date: Mon, 21 Oct 2019 09:44:41 -0700 Subject: [PATCH] Add 'javadoc' task to lifecycle check tasks (#48214) --- .../src/main/java/org/elasticsearch/gradle/reaper/Reaper.java | 2 +- .../main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/buildSrc/reaper/src/main/java/org/elasticsearch/gradle/reaper/Reaper.java b/buildSrc/reaper/src/main/java/org/elasticsearch/gradle/reaper/Reaper.java index 361e483d4a8..27cde3b6e1b 100644 --- a/buildSrc/reaper/src/main/java/org/elasticsearch/gradle/reaper/Reaper.java +++ b/buildSrc/reaper/src/main/java/org/elasticsearch/gradle/reaper/Reaper.java @@ -37,7 +37,7 @@ import java.util.stream.Stream; * Since how to reap a given service is platform and service dependent, this tool * operates on system commands to execute. It takes a single argument, a directory * that will contain files with reaping commands. Each line in each file will be - * executed with {@link Runtime#getRuntime()#exec}. + * executed with {@link Runtime#exec(String)}. * * The main method will wait indefinitely on the parent process (Gradle) by * reading from stdin. When Gradle shuts down, whether normally or abruptly, the diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy index 4377403065a..6bdfcf025e6 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy @@ -689,6 +689,10 @@ class BuildPlugin implements Plugin { */ (javadoc.options as CoreJavadocOptions).addBooleanOption('html5', true) } + // ensure javadoc task is run with 'check' + project.pluginManager.withPlugin('lifecycle-base') { + project.tasks.getByName(LifecycleBasePlugin.CHECK_TASK_NAME).dependsOn(project.tasks.withType(Javadoc)) + } configureJavadocJar(project) }