From 6e9e191acfa969e8feefe178a3e221000ba0bc1e Mon Sep 17 00:00:00 2001 From: Jamie McDonald Date: Mon, 17 Mar 2014 17:26:54 +0100 Subject: [PATCH] Deployment stuff --- build.gradle | 2 +- lib/build.gradle | 43 +++++++++++++++++++++++++++++++++++++++---- 2 files changed, 40 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 857a15d..0a192fd 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ buildscript { allprojects { group = 'com.soundcloud.android.crop' - version = '1.0.0' + version = '0.9.0' repositories { mavenCentral() diff --git a/lib/build.gradle b/lib/build.gradle index 5d796e7..c6db583 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -1,4 +1,5 @@ apply plugin: 'android-library' +apply plugin: 'maven' archivesBaseName = 'android-crop' @@ -9,11 +10,9 @@ android { defaultConfig { minSdkVersion 9 targetSdkVersion 19 - versionCode 1 - versionName "1.0" - testPackageName "com.soundcloud.android.crop.test" - testInstrumentationRunner "android.test.InstrumentationTestRunner" + testPackageName 'com.soundcloud.android.crop.test' + testInstrumentationRunner 'android.test.InstrumentationTestRunner' } } @@ -29,6 +28,7 @@ dependencies { task apklib(type: Zip) { dependsOn 'packageReleaseJar' destinationDir = file('build/libs') + appendix = 'apklib' extension = 'apklib' from 'AndroidManifest.xml' @@ -44,3 +44,38 @@ artifacts { archives apklib } +uploadArchives { + repositories { + mavenDeployer { + repository(url: 'http://maven.int.s-cloud.net/content/repositories/releases') + + modifyPom(addFilter('aar') { artifact, file -> + artifact.name == archivesBaseName + }) + + modifyPom(addFilter('apklib') { artifact, file -> + artifact.name == archivesBaseName + '-apklib' + }) + } + } +} + +def modifyPom(pom) { + pom.project { + name 'android-crop' + description 'A simple Activity for cropping images' + url 'https://github.com/jdamcd/android-crop' + + licenses { + license { + name 'The Apache Software License, Version 2.0' + url 'http://www.apache.org/licenses/LICENSE-2.0.txt' + } + } + + organization { + name 'SoundCloud' + url 'http://developers.soundcloud.com' + } + } +}