From e0d54019fe4c2c8bb5fbeac2c9060571edd8ad78 Mon Sep 17 00:00:00 2001 From: Tushar Acharya Date: Thu, 28 Jan 2016 16:38:03 +0530 Subject: [PATCH] Updated gradle files for bintray upload --- build.gradle | 4 ++- cardstack/build.gradle | 75 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 77 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 0abc2df..476be83 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,9 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.0.0-alpha5' + classpath 'com.android.tools.build:gradle:2.0.0-alpha7' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' + classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/cardstack/build.gradle b/cardstack/build.gradle index 47b98d1..4804a15 100644 --- a/cardstack/build.gradle +++ b/cardstack/build.gradle @@ -1,4 +1,11 @@ apply plugin: 'com.android.library' +apply plugin: 'com.github.dcendents.android-maven' +apply plugin: 'com.jfrog.bintray' + +def siteUrl = 'https://github.com/mutualmobile/CardStackUI' +def gitUrl = 'https://github.com/mutualmobile/CardStackUI.git' +group = "com.mutualmobile.android" +version = "0.1" android { compileSdkVersion 23 @@ -8,7 +15,7 @@ android { minSdkVersion 14 targetSdkVersion 23 versionCode 1 - versionName "1.0" + versionName version } buildTypes { release { @@ -18,7 +25,73 @@ android { } } +install { + repositories.mavenInstaller { + // This generates POM.xml with proper parameters + pom { + project { + packaging 'aar' + name 'card-stack-ui' + url siteUrl + + // Set your license + licenses { + license { + name 'The Apache Software License, Version 2.0' + url 'http://www.apache.org/licenses/LICENSE-2.0.txt' + } + } + developers { + developer { + id 'tushar-acharya' + name 'Tushar Acharya' + email 'tushar.acharya@mutualmobile.com' + } + } + scm { + connection gitUrl + developerConnection gitUrl + url siteUrl + + } + } + } + } +} + dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:23.1.1' } + + +task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' +} + +artifacts { + archives sourcesJar +} + +Properties properties = new Properties() +properties.load(project.rootProject.file('local.properties').newDataInputStream()) + +bintray { + user = properties.getProperty("bintray.user") + key = properties.getProperty("bintray.apikey") + + configurations = ['archives'] + pkg { + repo = "Android" + name = "card-stack-ui" + userOrg = "mutualmobile" + websiteUrl = siteUrl + vcsUrl = gitUrl + licenses = ["Apache-2.0"] + publish = true + labels = ['aar', 'android', 'ui'] + publicDownloadNumbers = true + } +} +apply plugin: 'maven' \ No newline at end of file