赞
踩
Android 官方gradle用户指南(Gradle Plugin User Guide)
提高Gradle 运行速度 在 gradle.properites 中进行如下配置
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
可以在本仓库中直接下载Android.gitignore 文件
几个人一起开发的时候可以在.gitignore 文件中屏蔽了 gradle.properties 文件 ,然后每个人配置自己本地的
buildToolsVersion 和 gradle plugin 版本 还有一些配置
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# org.gradle.daemon = true
gradlePlugin = com.android.tools.build:gradle:2.2.3
buildSDKVersion = 25.0.1

/**
* gradlePlugin 本地的gradle 插件版本
* buildSDKVersion 本地编译版本
* 这两个值都定义在gradle.propertres 中 在.gitignore 已屏蔽提交
*/
buildscript {
repositories {
jcenter()
}
dependencies {
classpath gradlePlugin
}
}
ext{
buildToolsVersion = buildSDKVersion
}
allprojects {
repositories {
jcenter()
}
}

各modules 中的build.gradle 跟本项目一致
关于Gradle的一些应用也可以在
Android Studio 指南
查看
大家可以Star一下 后面遇到什么好玩的功能我会直接在上面补充 谢谢
偶尔写了点小文章ScottFu
关注微信公众号,每天都有优质技术文章,搞笑GIF图片推送哦。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。