From 27f4b02ab4991814f7f0786c5f0b73b213d70cee Mon Sep 17 00:00:00 2001 From: Dawid Weiss Date: Tue, 3 Dec 2019 09:27:52 +0100 Subject: [PATCH] Correct helpAnt location and add a check to verify this in the future. --- gradle/help.gradle | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/gradle/help.gradle b/gradle/help.gradle index 01fce34b00d..441d66644ec 100644 --- a/gradle/help.gradle +++ b/gradle/help.gradle @@ -3,7 +3,7 @@ configure(rootProject) { def helpFiles = [ ["Workflow", "help/workflow.txt", "Typical workflow commands."], - ["Ant", "help/ant-gradle.txt", "Ant-gradle migration help."], + ["Ant", "help/ant.txt", "Ant-gradle migration help."], ["Tests", "help/tests.txt", "Tests, filtering, beasting, etc."], ] @@ -22,9 +22,21 @@ configure(rootProject) { println "" println "This is an experimental Lucene/Solr gradle build. See some" println "guidelines, ant-equivalent commands etc. under help/*; or type:" - helpFiles.each { entry -> - println " gradlew :help${entry[0]} # ${entry[2]}" + helpFiles.each { section, path, sectionInfo -> + println " gradlew :help${section} # ${sectionInfo}" } } } + + task allHelpFilesExit() { + doFirst { + helpFiles.each { section, path, sectionInfo -> + if (!rootProject.file(path).exists()) { + throw new GradleException("Help file missing: ${path} (correct help.gradle)") + } + } + } + } + + check.dependsOn allHelpFilesExit }