From 97132c28a403d567fc82b909cfdaa76012d81303 Mon Sep 17 00:00:00 2001 From: Ludy Date: Sun, 24 Aug 2025 22:44:50 +0200 Subject: [PATCH] build(gradle): include all subprojects in license report generation (#4170) # Description of Changes - Updated `build.gradle` to ensure the `licenseReport` task processes both the root project and all subprojects. - Introduced `allProjects` variable that merges `subprojects` with the current project into a single set. - This change ensures license reporting covers the full multi-module project rather than only the root module. --- ## Checklist ### General - [x] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [x] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md) (if applicable) - [ ] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md) (if applicable) - [x] I have performed a self-review of my own code - [x] My changes generate no new warnings ### Documentation - [ ] I have updated relevant docs on [Stirling-PDF's doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) (if functionality has heavily changed) - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### UI Changes (if applicable) - [ ] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ### Testing (if applicable) - [ ] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing) for more details. --- .github/workflows/build.yml | 7 +++++-- .github/workflows/licenses-update.yml | 3 +++ build.gradle | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 60085f9c9..19108b186 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -175,10 +175,13 @@ jobs: java-version: "17" distribution: "temurin" - - name: check the licenses for compatibility + - name: Check licenses for compatibility run: ./gradlew clean checkLicense + env: + DISABLE_ADDITIONAL_FEATURES: false + STIRLING_PDF_DESKTOP_UI: true - - name: FAILED - check the licenses for compatibility + - name: FAILED - Check licenses for compatibility if: failure() uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: diff --git a/.github/workflows/licenses-update.yml b/.github/workflows/licenses-update.yml index 1f920e2da..5971f7dc9 100644 --- a/.github/workflows/licenses-update.yml +++ b/.github/workflows/licenses-update.yml @@ -58,6 +58,9 @@ jobs: - name: Check licenses for compatibility run: ./gradlew clean checkLicense + env: + DISABLE_ADDITIONAL_FEATURES: false + STIRLING_PDF_DESKTOP_UI: true - name: Upload artifact on failure if: failure() diff --git a/build.gradle b/build.gradle index 4016c2bc6..b722517a2 100644 --- a/build.gradle +++ b/build.gradle @@ -222,11 +222,14 @@ tasks.withType(JavaCompile).configureEach { dependsOn "spotlessApply" } +def allProjects = ((subprojects as Set) + project) as Set + licenseReport { - projects = [project] + projects = allProjects renderers = [new JsonReportRenderer()] allowedLicensesFile = project.layout.projectDirectory.file("app/allowed-licenses.json").asFile outputDir = project.layout.buildDirectory.dir("reports/dependency-license").get().asFile.path + configurations = [ "productionRuntimeClasspath", "runtimeClasspath" ] } // Configure the forked spring boot run task to properly delegate to the stirling-pdf module