@@ -21,9 +21,10 @@ import publishing.GenerateDigest
2121import publishing.PublishingHelperPlugin
2222
2323plugins {
24- id(" distribution" )
25- id(" signing" )
26- id(" polaris-reproducible" )
24+ id(" distribution" )
25+ id(" signing" )
26+ id(" polaris-spotless" )
27+ id(" polaris-reproducible" )
2728}
2829
2930description = " Apache Polaris Binary Distribution"
@@ -34,81 +35,72 @@ val adminProject = project(":polaris-admin")
3435val serverProject = project(" :polaris-server" )
3536
3637// Configurations to resolve artifacts from other projects
37- val adminDistribution by configurations.creating {
38+ val adminDistribution by
39+ configurations.creating {
3840 isCanBeConsumed = false
3941 isCanBeResolved = true
40- }
42+ }
4143
42- val serverDistribution by configurations.creating {
44+ val serverDistribution by
45+ configurations.creating {
4346 isCanBeConsumed = false
4447 isCanBeResolved = true
45- }
48+ }
4649
4750dependencies {
48- adminDistribution(project(" :polaris-admin" , " distributionElements" ))
49- serverDistribution(project(" :polaris-server" , " distributionElements" ))
51+ adminDistribution(project(" :polaris-admin" , " distributionElements" ))
52+ serverDistribution(project(" :polaris-server" , " distributionElements" ))
5053}
5154
5255distributions {
53- main {
54- distributionBaseName.set(" polaris-bin" )
55- contents {
56- // Copy admin distribution contents
57- into(" admin" ) {
58- from(adminDistribution) {
59- exclude(" quarkus-app-dependencies.txt" )
60- }
61- }
62-
63- // Copy server distribution contents
64- into(" server" ) {
65- from(serverDistribution) {
66- exclude(" quarkus-app-dependencies.txt" )
67- }
68- }
69-
70- // Copy scripts to bin directory
71- into(" bin" ) {
72- from(" bin/server" )
73- from(" bin/admin" )
74- }
75-
76- from(" README.md" )
77- from(" DISCLAIMER" )
78- from(" LICENSE" )
79- from(" NOTICE" )
80- }
56+ main {
57+ distributionBaseName.set(" polaris-bin" )
58+ contents {
59+ // Copy admin distribution contents
60+ into(" admin" ) { from(adminDistribution) { exclude(" quarkus-app-dependencies.txt" ) } }
61+
62+ // Copy server distribution contents
63+ into(" server" ) { from(serverDistribution) { exclude(" quarkus-app-dependencies.txt" ) } }
64+
65+ // Copy scripts to bin directory
66+ into(" bin" ) {
67+ from(" bin/server" )
68+ from(" bin/admin" )
69+ }
70+
71+ from(" README.md" )
72+ from(" DISCLAIMER" )
73+ from(" LICENSE" )
74+ from(" NOTICE" )
8175 }
76+ }
8277}
8378
84- val distTar = tasks.named<Tar >(" distTar" ) {
85- compression = Compression .GZIP
86- }
79+ val distTar = tasks.named<Tar >(" distTar" ) { compression = Compression .GZIP }
8780
88- val distZip = tasks.named<Zip >(" distZip" ) {
89- }
81+ val distZip = tasks.named<Zip >(" distZip" ) {}
9082
9183val digestDistTar =
92- tasks.register<GenerateDigest >(" digestDistTar" ) {
93- description = " Generate the distribution tar digest"
94- dependsOn(distTar)
95- file.set { distTar.get().archiveFile.get().asFile }
96- }
84+ tasks.register<GenerateDigest >(" digestDistTar" ) {
85+ description = " Generate the distribution tar digest"
86+ dependsOn(distTar)
87+ file.set { distTar.get().archiveFile.get().asFile }
88+ }
9789
9890val digestDistZip =
99- tasks.register<GenerateDigest >(" digestDistZip" ) {
100- description = " Generate the distribution zip digest"
101- dependsOn(distZip)
102- file.set { distZip.get().archiveFile.get().asFile }
103- }
91+ tasks.register<GenerateDigest >(" digestDistZip" ) {
92+ description = " Generate the distribution zip digest"
93+ dependsOn(distZip)
94+ file.set { distZip.get().archiveFile.get().asFile }
95+ }
10496
10597distTar.configure { finalizedBy(digestDistTar) }
10698
10799distZip.configure { finalizedBy(digestDistZip) }
108100
109101if (project.hasProperty(" release" ) || project.hasProperty(" signArtifacts" )) {
110- signing {
111- sign(distTar.get())
112- sign(distZip.get())
113- }
114- }
102+ signing {
103+ sign(distTar.get())
104+ sign(distZip.get())
105+ }
106+ }
0 commit comments