Skip to content

Commit 05c4d06

Browse files
author
Justin Ryan
committed
Putting javadoc and sources into proper confs and setting types
1 parent 61bd2b0 commit 05c4d06

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

gradle/convention.gradle

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,30 @@ subprojects { project ->
1313
status = rootProject.status
1414

1515
task sourcesJar(type: Jar, dependsOn:classes) {
16-
classifier = 'sources'
1716
from sourceSets.main.allSource
1817
}
1918

2019
task javadocJar(type: Jar, dependsOn:javadoc) {
21-
classifier = 'javadoc'
2220
from javadoc.destinationDir
2321
}
2422

25-
// Ensure output is on a new line
26-
javadoc.doFirst { println "" }
27-
23+
configurations.add('sources')
24+
configurations.add('javadoc')
2825

2926
artifacts {
30-
archives sourcesJar
31-
archives javadocJar
27+
sources(sourcesJar) {
28+
type 'source'
29+
classifier 'sources'
30+
}
31+
javadoc(javadocJar) {
32+
type 'javadoc'
33+
classifier 'javadoc'
34+
}
3235
}
36+
37+
// Ensure output is on a new line
38+
javadoc.doFirst { println "" }
39+
3340
}
3441

3542
task aggregateJavadoc(type: Javadoc) {

0 commit comments

Comments
 (0)