Switch to java 1.7

Taken from the gradle plugin user guide:

With Android KitKat (buildToolsVersion 19) you can use the diamond operator,
multi-catch, strings in switches, try with resources, etc.

Note that you can use minSdkVersion with a value earlier than 19, for all
language features except try with resources. If you want to use try with
resources, you will need to also use a minSdkVersion of 19.

You also need to make sure that Gradle is using version 1.7 or later of the
JDK. (And version 0.6.1 or later of the Android Gradle plugin.)
This commit is contained in:
Daniel Martí 2014-06-05 10:32:57 +02:00
parent 5dac28f882
commit 2f9c3b8056
3 changed files with 4 additions and 4 deletions

View File

@ -1 +1,3 @@
java.encoding=UTF-8
java.source=1.7
java.target=1.7

View File

@ -78,8 +78,8 @@ android {
buildToolsVersion toolVersion
compileOptions {
sourceCompatibility = "1.6"
targetCompatibility = "1.6"
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
sourceSets {

View File

@ -1,8 +1,6 @@
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
target=android-19
compile.source=1.6
compile.target=1.6
android.library.reference.1=extern/UniversalImageLoader/library
android.library.reference.2=extern/MemorizingTrustManager