-
Notifications
You must be signed in to change notification settings - Fork 3
/
gradle.properties
executable file
·44 lines (42 loc) · 2.56 KB
/
gradle.properties
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# 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.
# 配置编译时的虚拟机大小
# -Xms[size] 初始堆大小,默认物理内存的1/64
# -Xmx[size] 最大堆大小,默认物理内存的1/4
# -Xmx2048m:指定 JVM 最大允许分配的堆内存为 2048MB,它会采用按需分配的方式。
# -XX:MaxPermSize=512m:指定 JVM 最大允许分配的非堆内存为 512MB,同上堆内存一样也是按需分配的。
# -XX:+ HeapDumpOnOutOfMemoryError : OOM时导出堆到文件
org.gradle.jvmargs=-Xmx5120m -XX:MaxPermSize=1024m -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
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
# 开启并行编译,相当使用了多线程,
# 仅仅适用于模块化项目(存在多个 Library 库工程依赖主工程)
org.gradle.parallel=true
# 最大的优势在于帮助多 Moudle 的工程提速,
# 在编译多个 Module 相互依赖的项目时,Gradle 会按需选择进行编译,即仅仅编译相关的 Module
org.gradle.configureondemand=true
# 构建初始化需要执行许多任务,例如java虚拟机的启动,加载虚拟机环境,加载class文件等等,
# 配置此项可以开启线程守护,并且仅仅第一次编译时会开启线程(Gradle 3.0版本以后默认支持)
org.gradle.daemon=true
# 开启构建缓存,Gradle 3.5新的缓存机制,可以缓存所有任务的输出,
# 不同于buildCache仅仅缓存dex的外部libs,它可以复用
# 任何时候的构建缓存,设置包括其它分支的构建缓存
org.gradle.caching=true
# todo 单组件构建索引
buildWith=2