From 35234212acceaa3d0d91f34fe1c14e4a07b6ba1e Mon Sep 17 00:00:00 2001 From: Abhinay M Date: Wed, 9 Jan 2019 13:01:42 +0800 Subject: [PATCH] Fix gradle --- build.gradle | 7 +++++-- library/build.gradle | 25 +++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index e21d463..bebe9a2 100755 --- a/build.gradle +++ b/build.gradle @@ -2,8 +2,9 @@ buildscript { repositories { - jcenter() google() + jcenter() + mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:3.2.1' @@ -15,8 +16,10 @@ buildscript { allprojects { repositories { - jcenter() + mavenCentral() google() + jcenter() + maven { url "https://jitpack.io" } } } diff --git a/library/build.gradle b/library/build.gradle index 947cd83..b117e12 100755 --- a/library/build.gradle +++ b/library/build.gradle @@ -35,3 +35,28 @@ dependencies { implementation 'com.android.support.constraint:constraint-layout:1.1.3' } + +task sourcesJar(type: Jar) { + classifier = 'sources' + from android.sourceSets.main.java.sourceFiles +} + +task javadoc(type: Javadoc) { + source = android.sourceSets.main.java.sourceFiles + classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) +} + +task javadocJar(type: Jar, dependsOn: javadoc) { + classifier = 'javadoc' + from javadoc.destinationDir +} + +task classesJar(type: Jar) { + from "$buildDir/intermediates/classes/release" +} + +artifacts { + archives classesJar + archives javadocJar + archives sourcesJar +}