[android][gradle] Migrated to Gradle 2.1

- Also simplified automatic newest versions for all dependent libs
This commit is contained in:
Alex Zolotarev 2014-10-23 06:50:50 +03:00 committed by Alex Zolotarev
parent 52cda6ae7f
commit 9b6708c492
12 changed files with 24 additions and 19 deletions

View file

@ -4,7 +4,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.10.+'
classpath propGradleAndroidPlugin
}
}

View file

@ -1,8 +1,8 @@
apply plugin: 'android-library'
dependencies {
compile 'com.android.support:support-v4:20.0.+'
compile 'com.parse.bolts:bolts-android:1.1.2'
compile 'com.android.support:support-v4:+'
compile 'com.parse.bolts:bolts-android:+'
}
android {

View file

@ -1,6 +1,6 @@
#Tue Jun 17 21:31:41 PDT 2014
#Tue Oct 21 17:06:20 CEST 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-bin.zip

View file

@ -9,7 +9,7 @@
<uses-sdk
android:minSdkVersion="7"
tools:node="replace"/>
tools:overrideLibrary="com.google.android.gms" />
<uses-feature
android:glEsVersion="0x00020000"

View file

@ -4,7 +4,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.1'
classpath propGradleAndroidPlugin
}
}
@ -29,7 +29,7 @@ task ndkBuildClean(type:Exec, description: 'Clean native libraries') {
commandLine NDK_BUILD, 'clean'
}
tasks.withType(Compile) { compileTask -> compileTask.dependsOn ndkBuild }
tasks.withType(JavaCompile) { compileTask -> compileTask.dependsOn ndkBuild }
clean.dependsOn 'ndkBuildClean'

Binary file not shown.

View file

@ -1,6 +1,6 @@
#Thu Apr 24 20:55:59 FET 2014
#Tue Oct 21 17:06:20 CEST 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-bin.zip

View file

@ -4,7 +4,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.2'
classpath propGradleAndroidPlugin
}
}
@ -178,10 +178,14 @@ android {
abortOnError false
}
// version at the end of each built apk
applicationVariants.all { variant ->
// version at the end of each built apk
def file = variant.outputFile
variant.outputFile = new File(file.parent, file.name.replace(".apk", "-" + defaultConfig.versionName + "-" + getDate() + ".apk"))
variant.outputs.each { output ->
if (output.outputFile != null && output.outputFile.name.endsWith('.apk')) {
def file = output.outputFile
output.outputFile = new File(file.parent, file.name.replace(".apk", "-" + defaultConfig.versionName + "-" + getDate() + ".apk"))
}
}
}
signingConfigs {
@ -265,7 +269,7 @@ task ndkBuildClean(type:Exec, description: 'Clean native libraries') {
commandLine NDK_BUILD, 'clean'
}
tasks.withType(Compile) { compileTask ->
tasks.withType(JavaCompile) { compileTask ->
if (compileTask.name.contains('Release') || compileTask.name.contains('Beta')) {
compileTask.dependsOn ndkBuildRelease
} else {

View file

@ -5,5 +5,6 @@ propVersionCode=331
propVersionName=3.3.1
propDebugNdkFlags=V=1 NDK_DEBUG=1 DEBUG=1
propReleaseNdkFlags=V=1 NDK_DEBUG=0 PRODUCTION=1
propAndroidSupportLibrary=com.android.support:support-v4:20.0.+
propGooglePlayServices=com.google.android.gms:play-services:5.0.89
propAndroidSupportLibrary=com.android.support:support-v4:+
propGooglePlayServices=com.google.android.gms:play-services:+
propGradleAndroidPlugin=com.android.tools.build:gradle:0.13.+

Binary file not shown.

View file

@ -1,6 +1,6 @@
#Mon Jun 16 22:45:43 HST 2014
#Tue Oct 21 17:06:20 CEST 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-bin.zip