Correct helpAnt location and add a check to verify this in the future.

This commit is contained in:
Dawid Weiss 2019-12-03 09:27:52 +01:00
parent 5459a7938f
commit 27f4b02ab4
1 changed files with 15 additions and 3 deletions

View File

@ -3,7 +3,7 @@
configure(rootProject) { configure(rootProject) {
def helpFiles = [ def helpFiles = [
["Workflow", "help/workflow.txt", "Typical workflow commands."], ["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."], ["Tests", "help/tests.txt", "Tests, filtering, beasting, etc."],
] ]
@ -22,9 +22,21 @@ configure(rootProject) {
println "" println ""
println "This is an experimental Lucene/Solr gradle build. See some" println "This is an experimental Lucene/Solr gradle build. See some"
println "guidelines, ant-equivalent commands etc. under help/*; or type:" println "guidelines, ant-equivalent commands etc. under help/*; or type:"
helpFiles.each { entry -> helpFiles.each { section, path, sectionInfo ->
println " gradlew :help${entry[0]} # ${entry[2]}" 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
} }