File tree Expand file tree Collapse file tree 4 files changed +46
-40
lines changed Expand file tree Collapse file tree 4 files changed +46
-40
lines changed Original file line number Diff line number Diff line change @@ -34,11 +34,11 @@ extensions.configure(GrailsPublishExtension) {
3434}
3535
3636tasks. withType(Jar ). configureEach {
37- from(rootProject. layout. projectDirectory. file(' DISCLAIMER' )) {
38- into(' META-INF' )
39- }
40-
4137 if (it. archiveClassifier. getOrNull() != ' javadoc' ) {
38+ from(rootProject. layout. projectDirectory. file(' DISCLAIMER' )) {
39+ into(' META-INF' )
40+ }
41+
4242 def projectLicense = layout. projectDirectory. file(' src/main/resources/META-INF/LICENSE' )
4343 if (! projectLicense. asFile. exists()) {
4444 def basicLicense = rootProject. layout. projectDirectory. file(' licenses/LICENSE-Apache-2.0.txt' )
Original file line number Diff line number Diff line change @@ -53,27 +53,6 @@ tasks.withType(Jar).configureEach {
5353 ' Implementation-Vendor' : ' grails.apache.org'
5454 )
5555 duplicatesStrategy = DuplicatesStrategy . INCLUDE
56-
57- from(rootProject. layout. projectDirectory. file(' ../DISCLAIMER' )) {
58- into(' META-INF' )
59- }
60-
61- def projectLicense = layout. projectDirectory. file(' src/main/resources/META-INF/LICENSE' )
62- if (! projectLicense. asFile. exists()) {
63- def basicLicense = rootProject. layout. projectDirectory. file(' ../licenses/LICENSE-Apache-2.0.txt' )
64- from(basicLicense) {
65- into(' META-INF' )
66- rename { ' LICENSE' }
67- }
68- }
69-
70- def projectNotice = layout. projectDirectory. file(' src/main/resources/META-INF/NOTICE' )
71- if (! projectNotice. asFile. exists()) {
72- def basicNotice = rootProject. layout. projectDirectory. file(' ../grails-core/src/main/resources/META-INF/NOTICE' )
73- from(basicNotice) {
74- into(' META-INF' )
75- }
76- }
7756}
7857
7958// Any jar, zip, or archive should be reproducible
Original file line number Diff line number Diff line change @@ -33,6 +33,31 @@ extensions.configure(GrailsPublishExtension) {
3333 it. publishTestSources = findProperty(' pomPublishTestSources' ) ?: false
3434}
3535
36+ tasks. withType(Jar ). configureEach {
37+ if (it. archiveClassifier. getOrNull() != ' javadoc' ) {
38+ from(rootProject. layout. projectDirectory. file(' ../DISCLAIMER' )) {
39+ into(' META-INF' )
40+ }
41+
42+ def projectLicense = layout. projectDirectory. file(' src/main/resources/META-INF/LICENSE' )
43+ if (! projectLicense. asFile. exists()) {
44+ def basicLicense = rootProject. layout. projectDirectory. file(' ../licenses/LICENSE-Apache-2.0.txt' )
45+ from(basicLicense) {
46+ into(' META-INF' )
47+ rename { ' LICENSE' }
48+ }
49+ }
50+
51+ def projectNotice = layout. projectDirectory. file(' src/main/resources/META-INF/NOTICE' )
52+ if (! projectNotice. asFile. exists()) {
53+ def basicNotice = rootProject. layout. projectDirectory. file(' ../grails-core/src/main/resources/META-INF/NOTICE' )
54+ from(basicNotice) {
55+ into(' META-INF' )
56+ }
57+ }
58+ }
59+ }
60+
3661apply plugin : ' org.gradle.crypto.checksum'
3762
3863afterEvaluate {
Original file line number Diff line number Diff line change @@ -64,24 +64,26 @@ tasks.withType(Jar).configureEach {
6464 ' Implementation-Vendor' : ' grails.apache.org'
6565 )
6666
67- from(rootProject. layout. projectDirectory. file(' ../DISCLAIMER' )) {
68- into(' META-INF' )
69- }
70-
71- def projectLicense = layout. projectDirectory. file(' src/main/resources/META-INF/LICENSE' )
72- if (! projectLicense. asFile. exists()) {
73- def basicLicense = rootProject. layout. projectDirectory. file(' ../licenses/LICENSE-Apache-2.0.txt' )
74- from(basicLicense) {
67+ if (it. archiveClassifier. getOrNull() != ' javadoc' ) {
68+ from(rootProject. layout. projectDirectory. file(' ../DISCLAIMER' )) {
7569 into(' META-INF' )
76- rename { ' LICENSE' }
7770 }
78- }
7971
80- def projectNotice = layout. projectDirectory. file(' src/main/resources/META-INF/NOTICE' )
81- if (! projectNotice. asFile. exists()) {
82- def basicNotice = rootProject. layout. projectDirectory. file(' ../grails-core/src/main/resources/META-INF/NOTICE' )
83- from(basicNotice) {
84- into(' META-INF' )
72+ def projectLicense = layout. projectDirectory. file(' src/main/resources/META-INF/LICENSE' )
73+ if (! projectLicense. asFile. exists()) {
74+ def basicLicense = rootProject. layout. projectDirectory. file(' ../licenses/LICENSE-Apache-2.0.txt' )
75+ from(basicLicense) {
76+ into(' META-INF' )
77+ rename { ' LICENSE' }
78+ }
79+ }
80+
81+ def projectNotice = layout. projectDirectory. file(' src/main/resources/META-INF/NOTICE' )
82+ if (! projectNotice. asFile. exists()) {
83+ def basicNotice = rootProject. layout. projectDirectory. file(' ../grails-core/src/main/resources/META-INF/NOTICE' )
84+ from(basicNotice) {
85+ into(' META-INF' )
86+ }
8587 }
8688 }
8789}
You can’t perform that action at this time.
0 commit comments