Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
讓你的 android project 相容於 gradle 1.7 & 1.8
buildscript {
repositories {
mavenCentral()
}
dependencies {
if (gradle.gradleVersion.startsWith("1.8")) {
classpath 'com.android.tools.build:gradle:0.6.0'
} else {
classpath 'com.android.tools.build:gradle:0.5.6'
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '1.7'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment