From dd59275fb8f65026f4c0f3cfc2fa4493d6e4e56d Mon Sep 17 00:00:00 2001 From: Yang Song Date: Mon, 17 Sep 2018 19:27:20 -0700 Subject: [PATCH] Gradle: Add missing source and javadoc rules. (#113) --- build.gradle | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/build.gradle b/build.gradle index 2de236d..3064676 100644 --- a/build.gradle +++ b/build.gradle @@ -96,6 +96,25 @@ signing { sign configurations.archives } +javadoc.options { + encoding = 'UTF-8' + links 'https://docs.oracle.com/javase/8/docs/api/' +} + +task javadocJar(type: Jar) { + classifier = 'javadoc' + from javadoc +} + +task sourcesJar(type: Jar) { + classifier = 'sources' + from sourceSets.main.allSource +} + +artifacts { + archives javadocJar, sourcesJar +} + uploadArchives { repositories { mavenDeployer {