Add an equivalent of validate-source-patterns task, delegating to the same groovy script.

This commit is contained in:
Dawid Weiss 2020-01-10 12:02:30 +01:00
parent d7726495c5
commit 109444fc5b
3 changed files with 27 additions and 0 deletions

View File

@ -39,6 +39,7 @@ apply from: file('gradle/validation/forbidden-apis.gradle')
apply from: file('gradle/validation/jar-checks.gradle')
apply from: file('gradle/validation/git-status.gradle')
apply from: file('gradle/validation/versions-props-sorted.gradle')
apply from: file('gradle/validation/validate-source-patterns.gradle')
// Additional development aids.
apply from: file('gradle/maven/maven-local.gradle')

View File

@ -9,6 +9,7 @@ configure(rootProject) {
dependsOn verifyLocks
dependsOn ":versionsPropsAreSorted"
dependsOn ":checkWorkingCopyPristine"
dependsOn ":validateSourcePatterns"
// Attach tasks from other projects using lazy collection
// as they may not yet be defined.

View File

@ -0,0 +1,25 @@
// Equivalent of ant's "validate-source-patterns".
// This should be eventually rewritten in plain gradle. For now, delegate to
// the ant/groovy script we already have.
configurations {
checkSourceDeps
}
dependencies {
checkSourceDeps "org.codehaus.groovy:groovy-all:2.4.17"
checkSourceDeps "org.apache.rat:apache-rat:0.11"
}
configure(rootProject) {
task validateSourcePatterns() {
doFirst {
ant.taskdef(
resource: 'org/codehaus/groovy/antlib.xml',
classpath: configurations.checkSourceDeps.asPath)
ant.groovy(src: project(":lucene").file("tools/src/groovy/check-source-patterns.groovy"))
}
}
}