Commit Graph

1 Commits

Author SHA1 Message Date
Ludy
9e8c16f313
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.
2025-02-03 10:13:02 +00:00