Correct run order between tidy and regenerate's deps. Make snowball not fail on Windows (just emit an error).

This commit is contained in:
Dawid Weiss 2021-03-23 09:48:27 +01:00
parent 27510d5f2f
commit 34f589b0aa
2 changed files with 15 additions and 12 deletions

View File

@ -35,7 +35,7 @@ configure([
Set<Task> deps = regenerate.getTaskDependencies().getDependencies(regenerate)
def tidy = deps.find { it.name == "tidy" }
if (tidy) {
tidy.dependsOn (deps - [tidy])
tidy.mustRunAfter (deps - [tidy])
}
}
}

View File

@ -90,19 +90,22 @@ configure(project(":lucene:analysis:common")) {
description "Regenerates snowball stemmers."
group "generation"
dependsOn downloadSnowballStemmers
dependsOn downloadSnowballWebsite
dependsOn downloadSnowballData
doFirst {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
logger.warn("Snowball generation does not work on Windows, use a platform where bash is available.")
return
// Don't even bother adding dependencies.
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
doFirst {
// Just emit a big fat error message but don't fail the build.
logger.error("Snowball generation does not work on Windows, use a platform where bash is available.")
}
} else {
dependsOn downloadSnowballStemmers
dependsOn downloadSnowballWebsite
dependsOn downloadSnowballData
project.exec {
executable "bash"
args = [snowballScript, snowballStemmerDir, snowballWebsiteDir, snowballDataDir, projectDir]
doFirst {
project.exec {
executable "bash"
args = [snowballScript, snowballStemmerDir, snowballWebsiteDir, snowballDataDir, projectDir]
}
}
}
}