From ef129ae15483c83166fa674ba81c84832c39ce4d Mon Sep 17 00:00:00 2001 From: Henry Addo Date: Thu, 11 Jan 2018 14:27:34 +0100 Subject: [PATCH] Add license info to pom and package source and javadoc artifacts --- serializer/build.gradle | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/serializer/build.gradle b/serializer/build.gradle index 146d0bd..fbdd9ed 100644 --- a/serializer/build.gradle +++ b/serializer/build.gradle @@ -34,3 +34,28 @@ dependencies { compile appDependencies.gson testCompile appTestDependencies.junit } +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 +} +// To specify a license in the pom: +install { + repositories.mavenInstaller { + pom.project { + licenses { + license { + name 'The Apache Software License, Version 2.0' + url 'http://www.apache.org/licenses/LICENSE-2.0.txt' + distribution 'repo' + } + } + } + }