Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
compile android using java8
// http://www.cnblogs.com/youxilua/archive/2013/05/20/3087935.html
// https://github.com/evant/gradle-retrolambda
// http://tools.android.com/tech-docs/new-build-system/user-guide
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.10.4'
classpath 'me.tatarka:gradle-retrolambda:1.3.2'
}
}
// Required because retrolambda is on maven central
repositories {
mavenCentral()
}
apply plugin: 'android'
apply plugin: 'retrolambda'
apply plugin: 'eclipse'
dependencies {
compile files('libs/android-support-v4.jar')
}
retrolambda {
jdk System.getenv("JAVA_HOME")
javaVersion JavaVersion.VERSION_1_7
}
android {
compileSdkVersion 19
buildToolsVersion "19.1"
defaultConfig {
minSdkVersion 8
targetSdkVersion 19
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
instrumentTest.setRoot('tests')
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment