From 22010f0b1fab0f43c762f99fe69040ee069878c2 Mon Sep 17 00:00:00 2001 From: Mark Murphy Date: Mon, 22 Dec 2014 08:40:57 -0500 Subject: [PATCH] updated for Android Studio 1.0 and new AAR publishing system --- README.markdown | 5 +++-- build.gradle | 2 +- demo/build.gradle | 2 +- merge/build.gradle | 32 +++++++++++++++++--------------- 4 files changed, 22 insertions(+), 19 deletions(-) diff --git a/README.markdown b/README.markdown index 1739a74..6256a5a 100755 --- a/README.markdown +++ b/README.markdown @@ -44,7 +44,7 @@ repositories { } dependencies { - compile 'com.commonsware.cwac:merge:1.1.0' + compile 'com.commonsware.cwac:merge:1.1.+' } ``` @@ -166,7 +166,7 @@ that do not work on API Level 4 and are not noted as requiring a higher version. Version ------- -This is version v1.1.0 of this module. +This is version v1.1.1 of this module. For those of you updating from a previous version, please note that you need a new edition of the `SackOfViewsAdapter` JAR as well. @@ -201,6 +201,7 @@ Do not ask for help via Twitter. Release Notes ------------- +- v1.1.1: updated for Android Studio 1.0 and new AAR publishing system - v1.1.0: added `android:minSdkVersion` to library manifest - v1.0.4: added `cwac-` prefix to JAR - v1.0.3: re-fixed manifest to better handle manifest merging per issue #14 diff --git a/build.gradle b/build.gradle index a735b89..6356aab 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:0.14.+' + classpath 'com.android.tools.build:gradle:1.0.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/demo/build.gradle b/demo/build.gradle index 08b0d3e..449404c 100644 --- a/demo/build.gradle +++ b/demo/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'android' +apply plugin: 'com.android.application' repositories { maven { diff --git a/merge/build.gradle b/merge/build.gradle index 341792a..30e623b 100644 --- a/merge/build.gradle +++ b/merge/build.gradle @@ -1,17 +1,4 @@ -buildscript { - repositories { - mavenCentral() - } - dependencies { - classpath 'com.github.dcendents:android-maven-plugin:1.2' - } -} - -apply plugin: 'android-library' -apply plugin: 'android-maven' - -version '1.1.0' -group 'com.commonsware.cwac' +apply plugin: 'com.android.library' repositories { maven { @@ -53,5 +40,20 @@ android.libraryVariants.all { variant -> def task = project.tasks.create "jar${name.capitalize()}", Jar task.dependsOn variant.javaCompile task.from variant.javaCompile.destinationDir - task.archiveName = "cwac-${task.archiveName}" + task.baseName = "cwac-${PUBLISH_ARTIFACT_ID}" + task.version = PUBLISH_VERSION + task.exclude('com/commonsware/cwac/**/BuildConfig.**') } + +apply plugin: 'maven' + +uploadArchives { + repositories.mavenDeployer { + pom.groupId = PUBLISH_GROUP_ID + pom.artifactId = PUBLISH_ARTIFACT_ID + pom.version = PUBLISH_VERSION + + repository(url: LOCAL_REPO) + } +} +