Apache Lucene open-source search software
Fix immutable properties. Fix ant uri namespace no longer working (seems like gradle regression).
Dawid Weiss26eb84a3b5eb
diff --git a/gradle/validation/rat-sources.gradle b/gradle/validation/rat-sources.gradleindex 96a57c81e93..0f9dff1059e 100644--- a/gradle/validation/rat-sources.gradle+++ b/gradle/validation/rat-sources.gradle@@ -126,18 +126,16 @@ allprojects {*/class RatTask extends DefaultTask {@InputFiles- ListProperty<ConfigurableFileTree> inputFileTrees = project.objects.listProperty(ConfigurableFileTree)+ final ListProperty<ConfigurableFileTree> inputFileTrees = project.objects.listProperty(ConfigurableFileTree)@OutputFile- RegularFileProperty xmlReport = project.objects.fileProperty().convention(+ final RegularFileProperty xmlReport = project.objects.fileProperty().convention(project.layout.buildDirectory.file("rat/rat-report.xml"))def generateReport(File reportFile) {// Set up ant rat task.- def uri = 'antlib:org.apache.rat.anttasks'def ratClasspath = project.rootProject.configurations.ratDeps.asPath- ant.taskdef(resource: 'org/apache/rat/anttasks/antlib.xml', uri: uri, classpath: ratClasspath)- def rat = NamespaceBuilder.newInstance(ant, uri)+ ant.taskdef(resource: 'org/apache/rat/anttasks/antlib.xml', classpath: ratClasspath)// Collect all output files for debugging.String inputFileList = inputFileTrees.get().collectMany { fileTree ->@@ -146,7 +144,7 @@ class RatTask extends DefaultTask {project.file(reportFile.path.replaceAll('.xml$', '-filelist.txt')).setText(inputFileList, "UTF-8")// Run rat via ant.- rat.report(format: 'xml', reportFile: reportFile, addDefaultLicenseMatchers: true) {+ ant.report(format: 'xml', reportFile: reportFile, addDefaultLicenseMatchers: true) {// Pass all gradle file trees to the ant task (Gradle's internal adapters are used).inputFileTrees.get().each { fileTree ->fileTree.addToAntBuilder(ant, 'resources', FileCollection.AntType.ResourceCollection)