[Android] [PATCH] gralde upgrade + global vars
Geoffrey Métais
geoffrey.metais at gmail.com
Thu Nov 20 15:59:29 CET 2014
- Global variables for compileSdkVersion and buildToolsVersion, set only once now.
- upgrade to gradle 0.14.2 wich is currently recommended
- Better Wheelview project declaration
- switch from runProguard to minifyEnabled, runProguard will soon be obsolete
---
build.gradle | 7 ++++++-
java-libs/WheelView/build.gradle | 6 +++---
libvlc/build.gradle | 6 +++---
settings.gradle | 3 ++-
vlc-android/build.gradle | 6 +++---
5 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/build.gradle b/build.gradle
index db6510b..b218696 100644
--- a/build.gradle
+++ b/build.gradle
@@ -4,7 +4,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:0.13.+'
+ classpath 'com.android.tools.build:gradle:0.14.2'
}
}
@@ -13,3 +13,8 @@ allprojects {
jcenter()
}
}
+
+ext {
+ buildToolsVersion = "21.0.2"
+ compileSdkVersion = 21
+}
\ No newline at end of file
diff --git a/java-libs/WheelView/build.gradle b/java-libs/WheelView/build.gradle
index 2a86e6e..d0f71fe 100644
--- a/java-libs/WheelView/build.gradle
+++ b/java-libs/WheelView/build.gradle
@@ -1,8 +1,8 @@
apply plugin: 'com.android.library'
android {
- compileSdkVersion 21
- buildToolsVersion "21.0.2"
+ compileSdkVersion rootProject.ext.compileSdkVersion
+ buildToolsVersion rootProject.ext.buildToolsVersion
sourceSets {
main {
@@ -24,7 +24,7 @@ android {
buildTypes {
release {
- runProguard false
+ minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
diff --git a/libvlc/build.gradle b/libvlc/build.gradle
index c820820..aed2fe3 100644
--- a/libvlc/build.gradle
+++ b/libvlc/build.gradle
@@ -1,8 +1,8 @@
apply plugin: 'com.android.library'
android {
- compileSdkVersion 21
- buildToolsVersion "21.0.2"
+ compileSdkVersion rootProject.ext.compileSdkVersion
+ buildToolsVersion rootProject.ext.buildToolsVersion
sourceSets {
main {
@@ -26,7 +26,7 @@ android {
buildTypes {
release {
- runProguard false
+ minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
diff --git a/settings.gradle b/settings.gradle
index 3a82d2c..074818d 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,3 +1,4 @@
-include ':java-libs/WheelView'
+include ':WheelView'
include ':libvlc'
include ':vlc-android'
+project(':WheelView').projectDir = new File('java-libs/WheelView')
\ No newline at end of file
diff --git a/vlc-android/build.gradle b/vlc-android/build.gradle
index 1d0f39a..69ef9f7 100644
--- a/vlc-android/build.gradle
+++ b/vlc-android/build.gradle
@@ -37,8 +37,8 @@ task buildRelease(type:Exec) {
}
android {
- compileSdkVersion 21
- buildToolsVersion "21.0.2"
+ compileSdkVersion rootProject.ext.compileSdkVersion
+ buildToolsVersion rootProject.ext.buildToolsVersion
lintOptions {
abortOnError false
@@ -121,7 +121,7 @@ android {
}
dependencies {
- compile project(':java-libs/WheelView')
+ compile project(':WheelView')
compile project(':libvlc')
compile 'com.android.support:appcompat-v7:21.0.0'
compile 'com.android.support:cardview-v7:21.0.0'
--
1.9.1
More information about the Android
mailing list