相关教程
http://www.cnblogs.com/davenkin/p/gradle-learning-1.html
http://wiki.jikexueyuan.com/project/GradleUserGuide-Wiki/
http://stormzhang.com/devtools/2014/12/18/android-studio-tutorial4/
http://wiki.jikexueyuan.com/project/gradle/dependency-management-basics.html
https://segmentfault.com/a/1190000002439306
// 声明是Android程序
apply plugin: 'com.android.application'
android {
// 编译SDK的版本
compileSdkVersion 21
// build tools的版本
buildToolsVersion "21.1.1"
defaultConfig {
// 应用的包名
applicationId "me.storm.ninegag"
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0.0"
}
// java版本
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
buildTypes {
release {
// 是否进行混淆
minifyEnabled false
// 混淆文件的位置
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
// 移除lint检查的error
lintOptions {
abortOnError false
}
}
dependencies {
// 编译libs目录下的所有jar包
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:21.0.2'
compile 'com.etsy.android.grid:library:1.0.5'
compile 'com.alexvasilkov:foldable-layout:1.0.1'
// 编译extras目录下的ShimmerAndroid模块
compile project(':extras:ShimmerAndroid')
}