From 01c82b90bad9ec0a9f2c514092f50f68568ac7ce Mon Sep 17 00:00:00 2001 From: cketti Date: Fri, 9 Jan 2015 09:34:22 +0100 Subject: [PATCH] Move values from AndroidManifest.xml to build.gradle Fix android-mvn-push.gradle --- android-mvn-push.gradle | 5 ++--- ckChangeLog/build.gradle | 7 +++++++ ckChangeLog/src/main/AndroidManifest.xml | 8 +------- sample/build.gradle | 8 ++++++++ sample/src/main/AndroidManifest.xml | 10 ++-------- 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/android-mvn-push.gradle b/android-mvn-push.gradle index 563720d..2cfe094 100644 --- a/android-mvn-push.gradle +++ b/android-mvn-push.gradle @@ -2,9 +2,8 @@ apply plugin: 'maven' apply plugin: 'signing' afterEvaluate { project -> - def android_manifest = new XmlParser(false, false).parseText(new File(project.projectDir, 'src/main/AndroidManifest.xml').getText()) - project.version = android_manifest.'@android:versionName' - project.group = android_manifest.'@package' + project.version = android.defaultConfig.versionName + project.group = project.pom.group uploadArchives { repositories { diff --git a/ckChangeLog/build.gradle b/ckChangeLog/build.gradle index 0c8a73f..a4df591 100644 --- a/ckChangeLog/build.gradle +++ b/ckChangeLog/build.gradle @@ -13,10 +13,17 @@ apply plugin: 'com.android.library' android { compileSdkVersion 21 buildToolsVersion "21.1.2" + + defaultConfig { + versionName "1.2.1" + + minSdkVersion 4 + } } project.ext { pom = [ + group: "de.cketti.library.changelog", artifactId: "ckchangelog", name: "ckChangeLog Library", description: "An Android Library to display a Change Log", diff --git a/ckChangeLog/src/main/AndroidManifest.xml b/ckChangeLog/src/main/AndroidManifest.xml index da55480..03a7ba0 100644 --- a/ckChangeLog/src/main/AndroidManifest.xml +++ b/ckChangeLog/src/main/AndroidManifest.xml @@ -1,10 +1,4 @@ - - - + diff --git a/sample/build.gradle b/sample/build.gradle index 991d110..8da23e5 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -13,6 +13,14 @@ apply plugin: 'com.android.application' android { compileSdkVersion 21 buildToolsVersion "21.1.2" + + defaultConfig { + versionCode 1 + versionName "1.0" + + minSdkVersion 7 + targetSdkVersion 17 + } } dependencies { diff --git a/sample/src/main/AndroidManifest.xml b/sample/src/main/AndroidManifest.xml index dd92d06..032f509 100644 --- a/sample/src/main/AndroidManifest.xml +++ b/sample/src/main/AndroidManifest.xml @@ -1,12 +1,6 @@ - - + package="de.cketti.sample.changelog"> - \ No newline at end of file +