From 873a541953bb5507152dffef03b4999df9bf31e7 Mon Sep 17 00:00:00 2001 From: Inbal Honigman <12940082+InbalHoni@users.noreply.github.com> Date: Sun, 5 Jul 2026 11:34:01 +0300 Subject: [PATCH] fix(build): resolve rat license-check paths against project root The :rat task used relative paths, which the Gradle daemon's embedded Ant builder resolves against the daemon working directory (~/.gradle/daemon/5.6.4/) instead of the project root - so it scanned the wrong directory and could not find the report stylesheet, failing `./gradlew clean assemble`. Switched to absolute paths (project.projectDir / project.buildDir). Verified `assemble` now passes with :rat succeeding. --- gradle/rat.gradle | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gradle/rat.gradle b/gradle/rat.gradle index 8c8ac5e8..2c3b2a37 100644 --- a/gradle/rat.gradle +++ b/gradle/rat.gradle @@ -28,18 +28,19 @@ class RatTask extends DefaultTask { @Input List excludes - def reportPath = 'build/rat' - def stylesheet = 'gradle/resources/rat-output-to-html.xsl' + def reportPath = "${project.buildDir}/rat" + def stylesheet = "${project.projectDir}/gradle/resources/rat-output-to-html.xsl" def xmlReport = reportPath + '/rat-report.xml' def htmlReport = reportPath + '/rat-report.html' def generateXmlReport(File reportDir) { def antBuilder = services.get(IsolatedAntBuilder) def ratClasspath = project.configurations.rat + def scanDir = project.projectDir antBuilder.withClasspath(ratClasspath).execute { ant.taskdef(resource: 'org/apache/rat/anttasks/antlib.xml') ant.report(format: 'xml', reportFile: xmlReport) { - fileset(dir: ".") { + fileset(dir: scanDir) { patternset { excludes.each { exclude(name: it)