Created
June 7, 2018 03:00
-
-
Save frankies/70b7683e7a96245deb0a40ac0fc72c33 to your computer and use it in GitHub Desktop.
gradle 全局设置,以下文件放到~/.gradle下
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
org.gradle.configureondemand=true | |
org.gradle.daemon=true | |
org.gradle.parallel=true | |
org.gradle.jvmargs=-Xms512m -Xmx1024m | |
org.gradle.workers.max=100 | |
#org.gradle.jvmargs=-Xmx2g -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//对java 编译操作开辟独立线程 | |
tasks.withType(JavaCompile) { | |
options.fork = true | |
} | |
//对于单元测试开辟独立线程 | |
test.maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1 | |
test.forkEvery = 100 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment