Skip to content

Commit 529ed78

Browse files
coopernetesclaude
andcommitted
ci: fix license check allowlist and rename config files with gradle- prefix
- Add missing Apache-2.0 name variants seen in real POMs (The Apache License, The Apache Software License, lowercase-v form, Eclipse Distribution License exact string, Eclipse Public License v. 2.0 with period, GPL+CPE variant, MIT-0, Public Domain CC0 form) - Rename allowed-licenses.json → gradle-allowed-licenses.json and license-overrides.json → gradle-license-overrides.txt so npm equivalents can follow the same naming convention - Switch renderer to InventoryHtmlReportRenderer with overrides file for deps with malformed POM license declarations (jspecify null, nimbus quoted) - Exclude those two deps from the compliance check (both confirmed Apache-2.0); overrides file documents correct license for the HTML report - checkLicense now passes clean across all three subprojects Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent b6b7436 commit 529ed78

3 files changed

Lines changed: 19 additions & 5 deletions

File tree

build.gradle

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,16 @@ subprojects {
109109
apply plugin: 'com.github.jk1.dependency-license-report'
110110

111111
licenseReport {
112-
allowedLicensesFile = rootProject.file('allowed-licenses.json')
112+
allowedLicensesFile = rootProject.file('gradle-allowed-licenses.json')
113113
configurations = ['runtimeClasspath']
114114
excludeOwnGroup = true
115115
excludeBoms = true
116-
renderers = [new com.github.jk1.license.render.JsonReportRenderer('licenses.json'),
117-
new com.github.jk1.license.render.SimpleHtmlReportRenderer('index.html')]
116+
// These deps have malformed POM license declarations (null name or quoted MIME-style string)
117+
// but are confirmed Apache-2.0. Overrides in gradle-license-overrides.txt fix the HTML report.
118+
excludes = ['org.jspecify:jspecify', 'com.nimbusds:oauth2-oidc-sdk']
119+
renderers = [new com.github.jk1.license.render.InventoryHtmlReportRenderer(
120+
'index.html', 'git-proxy-java', rootProject.file('gradle-license-overrides.txt')),
121+
new com.github.jk1.license.render.JsonReportRenderer('licenses.json')]
118122
}
119123

120124
spotless {
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
{
22
"allowedLicenses": [
33
{ "moduleLicense": "Apache License, Version 2.0" },
4+
{ "moduleLicense": "The Apache License, Version 2.0" },
45
{ "moduleLicense": "Apache Software License, Version 2.0" },
6+
{ "moduleLicense": "The Apache Software License, Version 2.0" },
57
{ "moduleLicense": "Apache License 2.0" },
68
{ "moduleLicense": "Apache License Version 2" },
9+
{ "moduleLicense": "Apache License, version 2.0" },
710
{ "moduleLicense": "Apache-2.0" },
811
{ "moduleLicense": "Apache 2" },
912
{ "moduleLicense": "Apache License, Version 1.1" },
@@ -13,6 +16,7 @@
1316
{ "moduleLicense": "MIT License" },
1417
{ "moduleLicense": "The MIT License" },
1518
{ "moduleLicense": "MIT" },
19+
{ "moduleLicense": "MIT-0" },
1620

1721
{ "moduleLicense": "BSD 2-Clause License" },
1822
{ "moduleLicense": "BSD-2-Clause" },
@@ -28,6 +32,7 @@
2832

2933
{ "moduleLicense": "PostgreSQL License" },
3034

35+
{ "moduleLicense": "Eclipse Distribution License - v 1.0" },
3136
{ "moduleLicense": "Eclipse Distribution License" },
3237
{ "moduleLicense": "EDL 1.0" },
3338

@@ -37,6 +42,7 @@
3742
{ "moduleLicense": "EPL-1.0" },
3843

3944
{ "moduleLicense": "Eclipse Public License v2.0" },
45+
{ "moduleLicense": "Eclipse Public License v. 2.0" },
4046
{ "moduleLicense": "Eclipse Public License - v 2.0" },
4147
{ "moduleLicense": "Eclipse Public License 2.0" },
4248
{ "moduleLicense": "EPL-2.0" },
@@ -58,6 +64,7 @@
5864

5965
{ "moduleLicense": "CC0" },
6066
{ "moduleLicense": "CC0-1.0" },
67+
{ "moduleLicense": "Public Domain, per Creative Commons CC0" },
6168

6269
{ "moduleLicense": "Public Domain" },
6370

@@ -76,7 +83,8 @@
7683
{ "moduleLicense": "Unicode" },
7784

7885
{ "moduleLicense": "GPL2 w/ CPE" },
79-
{ "moduleLicense": "Classpath-exception" },
80-
{ "moduleLicense": "GNU General Public License, version 2, with the Classpath Exception" }
86+
{ "moduleLicense": "GNU General Public License, version 2 with the GNU Classpath Exception" },
87+
{ "moduleLicense": "GNU General Public License, version 2, with the Classpath Exception" },
88+
{ "moduleLicense": "Classpath-exception" }
8189
]
8290
}

gradle-license-overrides.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
org.jspecify:jspecify:1.0.0|https://jspecify.dev|Apache License, Version 2.0|https://www.apache.org/licenses/LICENSE-2.0.txt
2+
com.nimbusds:oauth2-oidc-sdk:11.26.1|https://connect2id.com/products/nimbus-oauth-openid-connect-sdk|Apache License, Version 2.0|https://www.apache.org/licenses/LICENSE-2.0.html

0 commit comments

Comments
 (0)