diff --git a/build.gradle b/build.gradle index cca3130f..f971b54d 100644 --- a/build.gradle +++ b/build.gradle @@ -135,6 +135,16 @@ sourceSets { } } +task sourcesJar(type: Jar, dependsOn: classes) { + classifier = 'sources' + from sourceSets.main.allSource +} + +task javadocJar(type: Jar, dependsOn: javadoc) { + classifier = 'javadoc' + from javadoc.destinationDir +} + task acceptanceTest(type: Test) { description = 'Runs the acceptance tests' group = 'verification' @@ -350,6 +360,8 @@ publishing { publications { mavenArtifact(MavenPublication) { from components.java + artifact sourcesJar + artifact javadocJar pom.withXml { asNode().children().last() + { resolveStrategy = Closure.DELEGATE_FIRST