You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/08/31 10:17:22 UTC
[GitHub] [lucene-solr] dweiss commented on a change in pull request #1806: LUCENE-9475: Switch validateSourcePatterns away from Ant legacy
dweiss commented on a change in pull request #1806:
URL: https://github.com/apache/lucene-solr/pull/1806#discussion_r480030991
##########
File path: gradle/validation/validate-source-patterns.gradle
##########
@@ -15,27 +15,233 @@
* limitations under the License.
*/
-// This should be eventually rewritten in plain gradle. For now, delegate to
-// the ant/groovy script we already have.
+import org.apache.rat.Defaults;
+import org.apache.rat.document.impl.FileDocument;
+import org.apache.rat.api.MetaData;
-configure(rootProject) {
- configurations {
- checkSourceDeps
+buildscript {
+ repositories {
+ mavenCentral()
}
dependencies {
- checkSourceDeps "org.codehaus.groovy:groovy-all:2.4.17"
- checkSourceDeps "org.apache.rat:apache-rat:${scriptDepVersions['apache-rat']}"
+ classpath "org.apache.rat:apache-rat:${scriptDepVersions['apache-rat']}"
+ }
+}
+
+configure(rootProject) {
+ task("validateSourcePatterns", type: ValidateSourcePatternsTask) {
+ group = 'Verification'
+ description = 'Validate Source Patterns'
+
+ // this task has no outputs, so it's always uptodate (if inputs don't change).
+ outputs.upToDateWhen { true }
Review comment:
I would move it to the class's constructor? Then inputs and outputs are consistently in the same code.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org