diff --git a/.idea/modules.xml b/.idea/modules.xml index a201154..ba8d00e 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -3,11 +3,8 @@ - - - \ No newline at end of file diff --git a/build.gradle b/build.gradle index 16f40d2..23f23f8 100644 --- a/build.gradle +++ b/build.gradle @@ -3,9 +3,11 @@ buildscript { repositories { jcenter() + google() } dependencies { classpath 'com.android.tools.build:gradle:3.0.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/slidingdrawer-sample/build.gradle b/slidingdrawer-sample/build.gradle index c4bf0ba..fcd4292 100644 --- a/slidingdrawer-sample/build.gradle +++ b/slidingdrawer-sample/build.gradle @@ -20,12 +20,12 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - testCompile 'junit:junit:4.12' + implementation fileTree(dir: 'libs', include: ['*.jar']) + testImplementation 'junit:junit:4.12' - compile project(':slidingdrawer') - compile 'com.android.support:appcompat-v7:27.0.0' - compile 'com.android.support:support-v4:27.0.0' - compile 'com.android.support:recyclerview-v7:27.0.0' - compile 'com.android.support:design:27.0.0' + implementation project(':slidingdrawer') + implementation 'com.android.support:appcompat-v7:27.0.0' + implementation 'com.android.support:support-v4:27.0.0' + implementation 'com.android.support:recyclerview-v7:27.0.0' + implementation 'com.android.support:design:27.0.0' } diff --git a/slidingdrawer/build.gradle b/slidingdrawer/build.gradle index af4ab23..b1f3c57 100644 --- a/slidingdrawer/build.gradle +++ b/slidingdrawer/build.gradle @@ -1,4 +1,7 @@ apply plugin: 'com.android.library' +apply plugin: 'com.github.dcendents.android-maven' + +group = 'com.github.PierfrancescoSoffritti' android { compileSdkVersion 27 @@ -8,7 +11,7 @@ android { minSdkVersion 15 targetSdkVersion 27 versionCode 1 - versionName "1.0" + versionName "1.0.0" } buildTypes { release { @@ -19,7 +22,31 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - testCompile 'junit:junit:4.12' - compile 'com.android.support:appcompat-v7:27.0.0' + implementation fileTree(dir: 'libs', include: ['*.jar']) + testImplementation 'junit:junit:4.12' + implementation 'com.android.support:appcompat-v7:27.0.0' +} + +// build a jar with source files +task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' +} + +task javadoc(type: Javadoc) { + failOnError false + source = android.sourceSets.main.java.sourceFiles + classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) + classpath += configurations.compile +} + +// build a jar with javadoc +task javadocJar(type: Jar, dependsOn: javadoc) { + classifier = 'javadoc' + from javadoc.destinationDir } + +artifacts { + archives sourcesJar + archives javadocJar +} \ No newline at end of file