Skip to content

Commit

Permalink
[#4661] improve(build): Add LICENSE and NOTICE file to jar (#5330)
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?

Add LICENSE and NOTICE files to the built jars.

### Why are the changes needed?

To meet the requirement.

Fix: #4661

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Local verification.

Co-authored-by: Jerry Shao <jerryshao@datastrato.com>
  • Loading branch information
github-actions[bot] and jerryshao authored Oct 29, 2024
1 parent d694cbb commit 74dd48a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,22 @@ subprojects {
from(tasks["javadoc"])
}

tasks.withType<Jar> {
into("META-INF") {
from(rootDir) {
if (name == "sourcesJar") {
include("LICENSE")
include("NOTICE")
} else {
include("LICENSE.bin")
rename("LICENSE.bin", "LICENSE")
include("NOTICE.bin")
rename("NOTICE.bin", "NOTICE")
}
}
}
}

if (project.name in listOf("web", "docs")) {
plugins.apply(NodePlugin::class)
configure<NodeExtension> {
Expand Down

0 comments on commit 74dd48a

Please sign in to comment.