Skip to content

Commit

Permalink
Display "/" for 'Unicode/ICU License'
Browse files Browse the repository at this point in the history
  • Loading branch information
Pil0tXia committed Apr 12, 2024
1 parent b5337ce commit 8ad3029
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ tasks.register('generateDistLicense') {
artifact.put("licenseContent", new String(artifactLicense.license.text.content.decodeBase64()))
}
} else {
artifact.put("license", artifactLicense.license.name.replaceAll("/", "-"))
artifact.put("license", artifactLicense.license.name)
artifact.put("licenseContent", artifactLicense.license.url)
}
thirdPartyArtifacts.add(artifact)
Expand All @@ -271,15 +271,16 @@ tasks.register('generateDistLicense') {
"This distribution contains the following third-party:\n\n"
thirdPartyArtifacts.each { artifact ->
// Write licenses
def artifactLicenseFile = new File(licensesDir, "${artifact.license}.txt")
def artifactLicenseFilename = artifact.license.replaceAll("/", "-") + ".txt"
def artifactLicenseFile = new File(licensesDir, artifactLicenseFilename)
if (artifact.licenseContent != null) {
artifactLicenseFile.text = artifact.licenseContent
} else {
artifactLicenseFile.text = "No license content provided by the artifact."
}

// Assemble LICENSE
distLicenseText += "${artifact.name} ${artifact.version} licensed under '${artifact.license}'. For details see: licenses/${artifact.license}.txt\n"
distLicenseText += "${artifact.name} ${artifact.version} licensed under '${artifact.license}'. For details see: licenses/${artifactLicenseFilename}\n"
}
distLicenseFile.text = distLicenseText
}
Expand Down
2 changes: 1 addition & 1 deletion tools/third-party-licenses/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ httpclient 4.5.13 licensed under 'Apache-2.0'. For details see: licenses/Apache-
httpcore 4.4.13 licensed under 'Apache-2.0'. For details see: licenses/Apache-2.0.txt
httpcore-nio 4.4.6 licensed under 'Apache-2.0'. For details see: licenses/Apache-2.0.txt
httpmime 4.5.13 licensed under 'Apache-2.0'. For details see: licenses/Apache-2.0.txt
icu4j 72.1 licensed under 'Unicode-ICU License'. For details see: licenses/Unicode-ICU License.txt
icu4j 72.1 licensed under 'Unicode/ICU License'. For details see: licenses/Unicode-ICU License.txt
ini4j 0.5.4 licensed under 'Apache-2.0'. For details see: licenses/Apache-2.0.txt
ipaddress 5.3.3 licensed under 'Apache-2.0'. For details see: licenses/Apache-2.0.txt
istack-commons-runtime 3.0.7 licensed under 'CDDL-1.1'. For details see: licenses/CDDL-1.1.txt
Expand Down

0 comments on commit 8ad3029

Please sign in to comment.