Apache Lucene open-source search software
Add an equivalent of validate-source-patterns task, delegating to the same groovy script.
Dawid Weiss109444fc5bb2
diff --git a/build.gradle b/build.gradleindex 17f63afd7b6..f18d89addbb 100644--- a/build.gradle+++ b/build.gradle@@ -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')diff --git a/gradle/validation/precommit.gradle b/gradle/validation/precommit.gradleindex 6711dbf94df..717f87000ac 100644--- a/gradle/validation/precommit.gradle+++ b/gradle/validation/precommit.gradle@@ -9,6 +9,7 @@ configure(rootProject) {dependsOn verifyLocksdependsOn ":versionsPropsAreSorted"dependsOn ":checkWorkingCopyPristine"+ dependsOn ":validateSourcePatterns"// Attach tasks from other projects using lazy collection// as they may not yet be defined.diff --git a/gradle/validation/validate-source-patterns.gradle b/gradle/validation/validate-source-patterns.gradlenew file mode 100644index 00000000000..1c7967ac521--- /dev/null+++ b/gradle/validation/validate-source-patterns.gradle@@ -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"))+ }+ }+}\ No newline at end of file