From e14ee6fabc3b3c6058bcc59ca26281024ba84619 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Sun, 4 Oct 2020 02:27:32 +0800 Subject: [PATCH] Include sources --- build.gradle | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build.gradle b/build.gradle index cbc5ba6..bc04f75 100644 --- a/build.gradle +++ b/build.gradle @@ -49,6 +49,11 @@ gradlePlugin { } } +task sourcesJar(type: Jar, dependsOn: classes) { + classifier("sources") + from sourceSets.main.allSource +} + bintray { user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER') key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_KEY') @@ -72,6 +77,7 @@ publishing { publications { MyPublication(MavenPublication) { from components.java + artifact(sourcesJar) } }