android gradle.properties

gradle.properties 里面配置的东西,在gradle 文件里面可以直接引用。

例如:
在你工程根目录的gradle.properties 文件里面
可以这样配置:

## Project-wide Gradle settings.
#
# 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: -Xmx1024m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#
# 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
#Thu Oct 26 18:42:58 CST 2017
systemProp.http.proxyHost=59.151.100.45
systemProp.http.nonProxyHosts=192.168.*
systemProp.http.proxyPort=33130


r2d2Dir=D:\\soft\\r2d22
r2d2Cmd=python

ANDROID_BUILD_SDK_VERSION=27

那么在你的build.gradle 里面,你就可以:

android {
        buildToolsVersion ANDROID_BUILD_SDK_VERSION

参看:http://www.cnblogs.com/if-else-if/p/5972530.html
https://docs.gradle.org/current/userguide/build_environment.html

posted @ 2017-11-02 17:46  有点理想的码农  阅读(1358)  评论(0编辑  收藏  举报