-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgradle.properties
38 lines (35 loc) · 2.76 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
# To speed up the compilation itself, you can tweak parameters on the Java Virtual Machine (JVM).
# There is a Gradle property called jvmargs that enables you to set different values for the memory
# allocation pool for the JVM. The two parameters that have a direct influence on your build speed
# are Xms and Xmx. The Xms parameter is used to set the initial amount of memory to be used, while
# the Xmx parameter is used to set a maximum.
# - Side effects
# The above line means, you are allowing Java compilers to have available memory up to 2 GB
# (2048 MB). If you do not have available memory to give out 2 GB to Java then you should not add
# this line.
org.gradle.jvmargs=-Xmx5120m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -server -Xms1G -Xmx2G -XX:ReservedCodeCacheSize=225m -XX:+OptimizeStringConcat -XX:+UseCompressedOops
# The Gradle daemon is a process that runs in the background on your machine. When you run a Gradle
# task using the daemon, the already-running process handles it. This eliminates Gradle startup
# costs that are otherwise incurred every time you run Gradle. The only downside to using the daemon
# is that the process takes up some memory: on my machine a couple hundred MB. After 3 hours of
# idle time the daemon will stop itself; you can stop it earlier by running gradle --stop on the
# command line (this is useful when sometimes your gradle builds give an error Unable to locate a
# Java Runtime to invoke).
# - Side effects
# 1 - Gradle daemon is a background process. If you use this, it might take (300-400) MB memory or
# more from your system.
# 2 - After adding the above line, try to Rebuild the project. If you get error, something like,
# Unable to locate a Java Runtime to invoke, very obvious solution, remove the line.
org.gradle.daemon=true
# If your Gradle build contains multiple decoupled projects, you can take advantage of Gradle’s
# parallel mode. In parallel mode, Gradle will run multiple executor threads, which can execute
# tasks from different projects in parallel. By default Gradle will create one executor thread for
# each CPU core on your machine, but this is configurable.
org.gradle.parallel=true
# In its default mode, Gradle configures every project before executing tasks, regardless of whether
# the project is actually needed for the particular build. “Configuration on demand” mode changes
# this behaviour, only configuring required projects. Like parallel mode, configuration on demand
# mode will have the greatest effect on multi-project builds with decoupled projects. Note that
# configuration on demand mode is currently an incubating feature, so isn’t fully supported. You can
# learn more about it in the Multi-project Builds section of the Gradle user guide.
org.gradle.configureondemand=true