[Android] gradle upgrade + global vars
Geoffrey Métais
git at videolan.org
Thu Nov 20 16:32:01 CET 2014
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Nov 20 14:12:46 2014 +0100| [ff0dbdd456ca64a6f0e7dee9ba068dd38e2f865d] | committer: Geoffrey Métais
gradle upgrade + global vars
- 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
- Ignore translations errors with lint
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=ff0dbdd456ca64a6f0e7dee9ba068dd38e2f865d
---
build.gradle | 7 ++++++-
java-libs/WheelView/build.gradle | 6 +++---
libvlc/build.gradle | 6 +++---
settings.gradle | 3 ++-
vlc-android/build.gradle | 7 ++++---
5 files changed, 18 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 b3d1210..69ef9f7 100644
--- a/vlc-android/build.gradle
+++ b/vlc-android/build.gradle
@@ -37,11 +37,12 @@ task buildRelease(type:Exec) {
}
android {
- compileSdkVersion 21
- buildToolsVersion "21.0.2"
+ compileSdkVersion rootProject.ext.compileSdkVersion
+ buildToolsVersion rootProject.ext.buildToolsVersion
lintOptions {
abortOnError false
+ disable 'MissingTranslation', 'ExtraTranslation'
}
defaultConfig {
@@ -120,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'
More information about the Android
mailing list