From 5ee701a12e3956f717448ffb1371c69633002ae9 Mon Sep 17 00:00:00 2001 From: "Yii.Guxing" Date: Thu, 6 Apr 2017 23:33:29 +0800 Subject: [PATCH] jitpack build --- build.gradle | 1 + composition-avatar/build.gradle | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index d51761e..711585a 100644 --- a/build.gradle +++ b/build.gradle @@ -7,6 +7,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:2.3.1' classpath 'me.tatarka:gradle-retrolambda:3.5.0' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/composition-avatar/build.gradle b/composition-avatar/build.gradle index 04fe839..6cb1638 100644 --- a/composition-avatar/build.gradle +++ b/composition-avatar/build.gradle @@ -1,4 +1,7 @@ apply plugin: 'com.android.library' +apply plugin: 'com.github.dcendents.android-maven' + +group='com.github.YiiGuxing' android { compileSdkVersion 25 @@ -10,15 +13,19 @@ android { versionCode 1 versionName "1.0.0" } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:support-annotations:25.3.1' + provided 'com.android.support:support-annotations:25.3.1' } + +// build a jar with source files +task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' +} + +artifacts { + archives sourcesJar +} \ No newline at end of file