You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polaris.apache.org by sn...@apache.org on 2026/09/25 13:40:16 UTC

(polaris) branch main updated: Fix license report task inputs (#5610)

This is an automated email from the ASF dual-hosted git repository.

snazy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git


The following commit(s) were added to refs/heads/main by this push:
     new befee34b3b Fix license report task inputs (#5610)
befee34b3b is described below

commit befee34b3ba260e3821d8aa7c70356fa7e834f72
Author: Robert Stupp <sn...@snazy.de>
AuthorDate: Fri Sep 25 15:40:12 2026 +0200

    Fix license report task inputs (#5610)
    
    Generate Quarkus application parts before producing dependency license reports and read the inventory from its original output location.
    Declare that inventory and `distribution/LICENSE` as task inputs so Gradle invalidates cached reports when bundled dependencies or license mentions change.
    
    This addresses recent intermittent CI failures caused by stale task outputs.
---
 build-logic/src/main/kotlin/licenses/QuarkusAppDependencyFilter.kt | 5 +++--
 build-logic/src/main/kotlin/polaris-license-report.gradle.kts      | 7 +++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/build-logic/src/main/kotlin/licenses/QuarkusAppDependencyFilter.kt b/build-logic/src/main/kotlin/licenses/QuarkusAppDependencyFilter.kt
index ea15b92160..6be2415203 100644
--- a/build-logic/src/main/kotlin/licenses/QuarkusAppDependencyFilter.kt
+++ b/build-logic/src/main/kotlin/licenses/QuarkusAppDependencyFilter.kt
@@ -34,10 +34,11 @@ class QuarkusAppDependencyFilter : DependencyFilter {
   override fun filter(data: ProjectData?): ProjectData {
     data!!
 
-    val dependenciesFile = data.project.file("build/quarkus-app/quarkus-app-dependencies.txt")
+    val dependenciesFile =
+      data.project.file("build/quarkus-build/app/quarkus-app/quarkus-app-dependencies.txt")
     if (!dependenciesFile.isFile) {
       throw GradleException(
-        "Expected Quarkus dependency inventory at '${dependenciesFile.path}'. Run quarkusBuild before generating the license report."
+        "Expected Quarkus dependency inventory at '${dependenciesFile.path}'. Run quarkusAppPartsBuild before generating the license report."
       )
     }
 
diff --git a/build-logic/src/main/kotlin/polaris-license-report.gradle.kts b/build-logic/src/main/kotlin/polaris-license-report.gradle.kts
index 5647c61042..bf6ad54a2c 100644
--- a/build-logic/src/main/kotlin/polaris-license-report.gradle.kts
+++ b/build-logic/src/main/kotlin/polaris-license-report.gradle.kts
@@ -54,12 +54,15 @@ licenseReport {
 
 val generateLicenseReport =
   tasks.named<ReportTask>("generateLicenseReport") {
-    dependsOn("quarkusBuild")
+    dependsOn("quarkusAppPartsBuild")
     inputs
       .files(
         normalizerBundle,
         allowedLicenses,
-        project.layout.buildDirectory.file("quarkus-app/quarkus-app-dependencies.txt"),
+        project.layout.projectDirectory.file("distribution/LICENSE"),
+        project.layout.buildDirectory.file(
+          "quarkus-build/app/quarkus-app/quarkus-app-dependencies.txt"
+        ),
       )
       .withPathSensitivity(PathSensitivity.RELATIVE)
     inputs.property("renderersHash", licenseReport.renderers.contentHashCode())