From 4711b82b6d861414604caafe638b09954f8f1fc3 Mon Sep 17 00:00:00 2001 From: Magnus Jahnen Date: Wed, 25 Jan 2017 17:28:25 -0800 Subject: [PATCH] Refactor bintray upload to upload all modules --- libaums/bintray.gradle => bintray.gradle | 1 + build.gradle | 28 +++++++++++++++++++- httpserver/build.gradle | 9 +++++++ libaums/install.gradle => install.gradle | 0 libaums/build.gradle | 33 +++++------------------- storageprovider/build.gradle | 15 +++++++++++ 6 files changed, 59 insertions(+), 27 deletions(-) rename libaums/bintray.gradle => bintray.gradle (98%) rename libaums/install.gradle => install.gradle (100%) diff --git a/libaums/bintray.gradle b/bintray.gradle similarity index 98% rename from libaums/bintray.gradle rename to bintray.gradle index c5ddbe09..5d4ca265 100644 --- a/libaums/bintray.gradle +++ b/bintray.gradle @@ -14,6 +14,7 @@ if (project.hasProperty("android")) { // Android libraries source = android.sourceSets.main.java.srcDirs classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) classpath += configurations.javadocDeps + failOnError = false } } else { // Java libraries task sourcesJar(type: Jar, dependsOn: classes) { diff --git a/build.gradle b/build.gradle index 23e72041..434937fc 100644 --- a/build.gradle +++ b/build.gradle @@ -15,6 +15,32 @@ buildscript { } } +ext { + bintrayRepo = 'maven' + bintrayName = 'libaums' + + publishedGroupId = 'com.github.mjdev' + libraryName = 'libaums' + + // artifact comes from module + //artifact = 'libaums' + + libraryDescription = 'Android USB mass storage library with FAT32 support.' + + siteUrl = 'https://github.com/mjdev/libaums' + gitUrl = 'https://github.com/mjdev/libaums.git' + + libraryVersion = '0.5.0' + + developerId = 'mjdev' + developerName = 'mjahnen' + developerEmail = 'jahnen@in.tum.de' + + licenseName = 'The Apache Software License, Version 2.0' + licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt' + allLicenses = ["Apache-2.0"] +} + allprojects { repositories { jcenter() @@ -23,4 +49,4 @@ allprojects { task clean(type: Delete) { delete rootProject.buildDir -} +} \ No newline at end of file diff --git a/httpserver/build.gradle b/httpserver/build.gradle index 49423a0c..1f9dad49 100644 --- a/httpserver/build.gradle +++ b/httpserver/build.gradle @@ -1,5 +1,9 @@ apply plugin: 'com.android.library' +ext { + artifact = 'libaums-http' +} + configurations { javadocDeps } @@ -35,3 +39,8 @@ dependencies { compile 'com.android.support:support-annotations:25.1.0' compile project(':libaums') } + +task bintray { + apply from: '../install.gradle' + apply from: '../bintray.gradle' +} \ No newline at end of file diff --git a/libaums/install.gradle b/install.gradle similarity index 100% rename from libaums/install.gradle rename to install.gradle diff --git a/libaums/build.gradle b/libaums/build.gradle index 32b9714b..a936ceb1 100644 --- a/libaums/build.gradle +++ b/libaums/build.gradle @@ -1,31 +1,12 @@ apply plugin: 'com.android.library' -configurations { - javadocDeps -} - ext { - bintrayRepo = 'maven' - bintrayName = 'libaums' - - publishedGroupId = 'com.github.mjdev' - libraryName = 'libaums' artifact = 'libaums' +} - libraryDescription = 'Android USB mass storage library with FAT32 support.' - - siteUrl = 'https://github.com/mjdev/libaums' - gitUrl = 'https://github.com/mjdev/libaums.git' - - libraryVersion = '0.5.0' - - developerId = 'mjdev' - developerName = 'mjahnen' - developerEmail = 'jahnen@in.tum.de' - licenseName = 'The Apache Software License, Version 2.0' - licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt' - allLicenses = ["Apache-2.0"] +configurations { + javadocDeps } android { @@ -56,7 +37,7 @@ dependencies { javadocDeps 'com.android.support:support-annotations:25.1.0' } -if("$System.env.UPLOAD_BINTRAY".equalsIgnoreCase("1")) { - apply from: 'install.gradle' - apply from: 'bintray.gradle' -} +task bintray { + apply from: '../install.gradle' + apply from: '../bintray.gradle' +} \ No newline at end of file diff --git a/storageprovider/build.gradle b/storageprovider/build.gradle index f3874b3d..0e2a19dd 100644 --- a/storageprovider/build.gradle +++ b/storageprovider/build.gradle @@ -1,5 +1,14 @@ apply plugin: 'com.android.library' + +ext { + artifact = 'libaums-storageprovider' +} + +configurations { + javadocDeps +} + android { compileSdkVersion 25 buildToolsVersion "25.0.2" @@ -26,3 +35,9 @@ dependencies { compile 'org.apache.commons:commons-io:1.3.2' compile project(':libaums') } + + +task bintray { + apply from: '../install.gradle' + apply from: '../bintray.gradle' +}