You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2021/08/25 08:05:22 UTC
[lucene] 07/12: Fix immutable properties. Fix ant uri namespace no
longer working (seems like gradle regression).
This is an automated email from the ASF dual-hosted git repository.
dweiss pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git
commit 26eb84a3b5ebe83f8ec94d0896ec7261340269ad
Author: Dawid Weiss <da...@carrotsearch.com>
AuthorDate: Tue Aug 24 13:13:26 2021 +0200
Fix immutable properties. Fix ant uri namespace no longer working (seems like gradle regression).
---
gradle/validation/rat-sources.gradle | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/gradle/validation/rat-sources.gradle b/gradle/validation/rat-sources.gradle
index 96a57c8..0f9dff1 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)