Skip to content

Commit 774a19d

Browse files
committed
Publish sources and javadoc artifacts
1 parent 3df7620 commit 774a19d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

build.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,27 @@ license {
4646
exclude 'introspectionQuery'
4747
}
4848

49+
// custom tasks for creating source/javadoc jars
50+
task sourcesJar(type: Jar, dependsOn: classes) {
51+
classifier = 'sources'
52+
from sourceSets.main.allSource
53+
}
54+
55+
task javadocJar(type: Jar, dependsOn: javadoc) {
56+
classifier = 'javadoc'
57+
from javadoc.destinationDir
58+
}
59+
4960
publishing {
5061
publications {
5162
MyPublication(MavenPublication) {
5263
from components.java
5364
groupId 'graphql-java-servlet'
5465
artifactId project.name
5566
version project.version
67+
68+
artifact sourcesJar
69+
artifact javadocJar
5670
}
5771
}
5872
}

0 commit comments

Comments
 (0)