Skip to content

Commit ba822be

Browse files
committed
[skip ci] fix: do not add licensing artifacts to javadoc jars
1 parent 26927ce commit ba822be

File tree

2 files changed

+25
-21
lines changed

2 files changed

+25
-21
lines changed

gradle/java-config.gradle

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -49,27 +49,6 @@ tasks.withType(Jar).configureEach {
4949
'Implementation-Version': grailsVersion,
5050
'Implementation-Vendor': 'grails.apache.org'
5151
)
52-
53-
from(rootProject.layout.projectDirectory.file('DISCLAIMER')) {
54-
into('META-INF')
55-
}
56-
57-
def projectLicense = layout.projectDirectory.file('src/main/resources/META-INF/LICENSE')
58-
if (!projectLicense.asFile.exists()) {
59-
def basicLicense = rootProject.layout.projectDirectory.file('licenses/LICENSE-Apache-2.0.txt')
60-
from(basicLicense) {
61-
into('META-INF')
62-
rename { 'LICENSE' }
63-
}
64-
}
65-
66-
def projectNotice = layout.projectDirectory.file('src/main/resources/META-INF/NOTICE')
67-
if (!projectNotice.asFile.exists()) {
68-
def basicNotice = rootProject.layout.projectDirectory.file('grails-core/src/main/resources/META-INF/NOTICE')
69-
from(basicNotice) {
70-
into('META-INF')
71-
}
72-
}
7352
}
7453

7554
// Any jar, zip, or archive should be reproducible

gradle/publish-config.gradle

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,31 @@ extensions.configure(GrailsPublishExtension) {
3333
it.testRepositoryPath = rootProject.layout.buildDirectory.dir('local-maven')
3434
}
3535

36+
tasks.withType(Jar).configureEach {
37+
from(rootProject.layout.projectDirectory.file('DISCLAIMER')) {
38+
into('META-INF')
39+
}
40+
41+
if(it.archiveClassifier.getOrNull() != 'javadoc') {
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+
3661
apply plugin: 'org.gradle.crypto.checksum'
3762

3863
afterEvaluate {

0 commit comments

Comments
 (0)