Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#4661] improve(build): Add LICENSE and NOTICE file to jar (#5273)

Jerry Shao80521fdb1dd6
diff --git a/build.gradle.kts b/build.gradle.kts
index 6b272101e0..453cadf9de 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -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> {