From e5549e3b78ba5bb9dfbee6c55f06d7f1037eb754 Mon Sep 17 00:00:00 2001 From: Juan Antonio Brena Moral Date: Fri, 9 Nov 2018 19:47:34 +0100 Subject: [PATCH] Adding Gradle support to publish sources Adding Gradle support to publish javadoc (Not enabled in this commit) --- build.gradle | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index dfd9f778..dda6f6fd 100644 --- a/build.gradle +++ b/build.gradle @@ -35,7 +35,7 @@ plugins { id 'maven-publish' } -version = '2.4.8-SNAPSHOT' +version = '2.4.10-SNAPSHOT' repositories { jcenter() @@ -151,6 +151,17 @@ configure(allprojects) { project -> ] } +task sourcesJar(type: Jar, dependsOn: classes) { + classifier 'sources' + from sourceSets.main.allSource +} + +//TODO Review failing classes in the next release +task javadocJar(type: Jar, dependsOn: javadoc) { + classifier = 'javadoc' + from javadoc.destinationDir +} + publishing { publications { maven(MavenPublication) { @@ -159,6 +170,12 @@ publishing { version = "${version}" from components.java + artifact (sourcesJar) { + classifier = 'sources' + } + //artifact (javadocJar) { + // classifier = 'javadoc' + //} } } }