-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
checks the compatibility of the licenses (#2844)
# Description of Changes ### What was changed - An **automated license check** was integrated into the CI/CD workflow (`build.yml` and `licenses-update.yml`). - A new file, `allowed-licenses.json`, was added to explicitly define the permitted licenses. - The **Gradle build process** was updated to run `checkLicense` and detect any non-compliant licenses. ### Why the change was made - **Improved license compliance** to ensure only compatible licenses are used. - **Automated license validation** within the CI/CD workflow to detect potential incompatibilities early. - **Legal risk mitigation** by excluding problematic licenses like **GPL-2.0 (without Classpath Exception)**. ### Any challenges encountered - The **allowed license list had to be manually curated** to ensure all relevant open-source libraries were covered. - Some dependencies use **slightly different license names** (e.g., `"Apache License, Version 2.0"` vs. `"Apache-2.0"`), which needed to be handled in the validation process. --- ## 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/DeveloperGuide.md) (if applicable) - [x] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md) (if applicable) - [x] I have performed a self-review of my own code - [x] My changes generate no new warnings ### Documentation - [x] 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/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) - [x] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing) for more details.
- Loading branch information
Showing
4 changed files
with
207 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
{ | ||
"allowedLicenses": [ | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "BSD License" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "The BSD License" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "BSD-2-Clause" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "BSD 2-Clause License" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "The 2-Clause BSD License" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "BSD-3-Clause" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "The BSD 3-Clause License (BSD3)" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "BSD-4 License" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "MIT" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "MIT License" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "The MIT License" | ||
}, | ||
{ | ||
"moduleName": "com.github.jai-imageio:jai-imageio-core", | ||
"moduleLicense": "LICENSE.txt" | ||
}, | ||
{ | ||
"moduleName": "com.github.jai-imageio:jai-imageio-jpeg2000", | ||
"moduleLicense": "LICENSE-JJ2000.txt, LICENSE-Sun.txt" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "Apache 2" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "Apache 2.0" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "Apache-2.0" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "Apache-2.0 License" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "Apache License 2.0" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "Apache License Version 2.0" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "Apache License, Version 2.0" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "The Apache License, Version 2.0" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "The Apache Software License, Version 2.0" | ||
}, | ||
{ | ||
"moduleName": "com.nimbusds:oauth2-oidc-sdk", | ||
"moduleLicense": "\"Apache License, version 2.0\";link=\"https://www.apache.org/licenses/LICENSE-2.0.html\"" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "MPL 2.0" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "UnboundID SCIM2 SDK Free Use License" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "GPL2 w/ CPE" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "GPLv2+CE" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "GNU GENERAL PUBLIC LICENSE, Version 2 + Classpath Exception" | ||
}, | ||
{ | ||
"moduleName": "com.martiansoftware:jsap", | ||
"moduleLicense": "LGPL" | ||
}, | ||
{ | ||
"moduleName": "org.hibernate.orm:hibernate-core", | ||
"moduleLicense": "GNU Library General Public License v2.1 or later" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "Eclipse Public License - v 1.0" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "Eclipse Public License v. 2.0" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "Eclipse Public License - v 2.0" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "Eclipse Public License - Version 2.0" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "Eclipse Public License, Version 2.0" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "Ubuntu Font Licence 1.0" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "Bouncy Castle Licence" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "Public Domain, per Creative Commons CC0" | ||
}, | ||
{ | ||
"moduleName": ".*", | ||
"moduleLicense": "The W3C License" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters