Skip to content

Commit 80ea9f9

Browse files
committed
Generate LICENSE/NOTICE in distribution
... from LICENSE/NOTICE files from admin + server
1 parent 6562901 commit 80ea9f9

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

runtime/distribution/build.gradle.kts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* under the License.
1818
*/
1919

20+
import licenses.LicenseNoticeMerge
2021
import publishing.PublishingHelperPlugin
2122
import publishing.digestTaskOutputs
2223
import publishing.signTaskOutputs
@@ -48,11 +49,25 @@ val serverDistribution by
4849
isCanBeResolved = true
4950
}
5051

52+
val licenseNotice by
53+
configurations.creating {
54+
isCanBeConsumed = false
55+
isCanBeResolved = true
56+
}
57+
5158
dependencies {
5259
adminDistribution(project(":polaris-admin", "distributionElements"))
5360
serverDistribution(project(":polaris-server", "distributionElements"))
61+
licenseNotice(project(":polaris-admin", "licenseNoticeElements"))
62+
licenseNotice(project(":polaris-server", "licenseNoticeElements"))
63+
}
64+
65+
val licenseNoticeMerge by tasks.registering(LicenseNoticeMerge::class) {
66+
sourceLicenseNotice = licenseNotice
5467
}
5568

69+
tasks.named("assembleDist").configure { dependsOn(licenseNoticeMerge) }
70+
5671
distributions {
5772
main {
5873
distributionBaseName.set("polaris-bin")
@@ -70,8 +85,7 @@ distributions {
7085
}
7186

7287
from("README.md")
73-
from("LICENSE")
74-
from("NOTICE")
88+
from(licenseNoticeMerge)
7589
}
7690
}
7791
}

0 commit comments

Comments
 (0)