From c0f9670788364daa8df9f1bf3a2009580e1187d9 Mon Sep 17 00:00:00 2001 From: Tudor Date: Fri, 18 Nov 2016 11:35:02 +0200 Subject: [PATCH] Update build.gradle with the added code it also generates *-sources.jar and *-docs.jar . I am new with Bintray but I had the surprise of package rejection because of missing sources & docs. That code is from http://stackoverflow.com/questions/11474729/how-to-build-sources-jar-with-gradle and it was given to be by someone from support, telling me to add the missing jars. --- .../configurations-example/build.gradle | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/gradle-bintray-plugin-examples/configurations-example/build.gradle b/gradle-bintray-plugin-examples/configurations-example/build.gradle index 5e4fbdd..93b42f5 100644 --- a/gradle-bintray-plugin-examples/configurations-example/build.gradle +++ b/gradle-bintray-plugin-examples/configurations-example/build.gradle @@ -53,6 +53,21 @@ bintray { } } +task sourcesJar(type: Jar, dependsOn: classes) { + classifier = 'sources' + from sourceSets.main.allSource +} + +task javadocJar(type: Jar, dependsOn: javadoc) { + classifier = 'javadoc' + from javadoc.destinationDir +} + +artifacts { + archives sourcesJar + archives javadocJar +} + task wrapper(type: Wrapper) { gradleVersion = '2.4' -} \ No newline at end of file +}