-
Notifications
You must be signed in to change notification settings - Fork 0
/
gradle.properties
132 lines (109 loc) · 6.8 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# 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
#########################################
# JVM Args
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Ensure important default jvmargs aren't overwritten. See https://github.com/gradle/gradle/issues/19750
#
# For more information about how Gradle JVM options were chosen:
# - Xmx - Maximum heap size. If the codebase grew it should be updated.
# - Xms - Minimum heap size, we set it to the peak measured heap size.
# - UseG1GC - If the goal is to return as much memory as possible to the machine, G1GC is the better
# choice. It is also very nearly as fast as ParallelGC.
# - Metaspace - See https://www.jasonpearson.dev/metaspace-in-jvm-builds/
# - SoftRefLRUPolicyMSPerMB would default to 1000 which with a 4gb heap translates to ~51 minutes.
# A value of 1 means ~4 seconds before SoftRefs can be collected, which means its realistic to
# collect them as needed during a build that should take seconds to minutes.
# - CodeCache normally defaults to a very small size. Increasing it from platform defaults of 32-48m
# because of how many classes can be loaded into memory and then cached as native compiled code
# for a small speed boost.
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -XX:+UseG1GC -XX:SoftRefLRUPolicyMSPerMB=1 -XX:ReservedCodeCacheSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xmx1g -Xms512m
# For more information about how Kotlin Daemon JVM options were chosen:
# - Kotlin JVM args only inherit Xmx, ReservedCodeCache, and MaxMetaspace. Since we are specifying
# other args we need to specify all of them here.
# - We're using the Kotlin Gradle Plugin's default value for ReservedCodeCacheSize, if we do not then
# the Gradle JVM arg value for ReservedCodeCacheSize will be used.
kotlin.daemon.jvmargs=-Dfile.encoding=UTF-8 -XX:+UseG1GC -XX:SoftRefLRUPolicyMSPerMB=1 -XX:ReservedCodeCacheSize=320m -XX:+HeapDumpOnOutOfMemoryError -Xmx1g -Xms512m
# For more information about how Gradle Worker JVM options were chosen
org.gradle.worker.jvmargs=-Dfile.encoding=UTF-8 -XX:+UseG1GC -XX:SoftRefLRUPolicyMSPerMB=1 -XX:ReservedCodeCacheSize=128m -XX:+HeapDumpOnOutOfMemoryError -Xmx512g -Xms256m
#########################################
# Non-default Gradle performance settings
# Gradle will use the local (and if configured, remote) build cache if true. This means that each
# step of the build that has deterministic outputs for the same inputs will be able to skip building
# in future builds. The local build cache is written to path
# `$GRADLE_USER_HOME/caches/build-cache-1`
org.gradle.caching=true
# Gradle will run in parallel mode if true.
# 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
# Gradle will use the local configuration cache if true. This means that for each step of the
# configuration phase that has deterministic outputs for the same inputs will be able to skip
# in future builds. The local configuration cache is written to path
# `$GRADLE_PROJECT_ROOT/.gradle/configuration-cache/<hasH>`
org.gradle.configuration-cache=true
org.gradle.configuration-cache.problems=warn
# This is an experimental flag starting in Gradle 8.11 to load config cache entries in parallel.
org.gradle.configuration-cache.parallel=true
# The following would be a semicolon separated list of glob wildcard file paths to ignore file
# system checks. As of early 2024 all known issues have been addressed and this should no longer be
# necessary. I am leaving this flag here for historical documentation purposes.
# org.gradle.configuration-cache.inputs.unsafe.ignore.file-system-checks=
# Before Gradle 8.4, some undeclared configuration inputs that were never used in the configuration
# logic could still be read when the task graph was serialized by the configuration cache. However,
# their changes would not invalidate the configuration cache afterward. Starting with Gradle 8.4,
# such undeclared configuration inputs are correctly tracked.
# As of 2/1/2024 AGP seems to have an undeclared configuration input based on Android SDK platform
# tool installation metadata, but this should never invalidate the configuration cache.
# https://docs.gradle.org/current/userguide/configuration_cache.html#config_cache:adoption:changes_in_behavior
# Trying out removing this
# org.gradle.configuration-cache.inputs.unsafe.ignore.in-serialization=true
# Isolated Projects allows configuration and tooling model creation for each project to safely
# run in parallel, with the result cached and invalidated independently for each project.
# Plugin Support:
# AGP: 8.8.0-alpha09
# KGP: Unknown
# Compose Compiler: Unknown
# See https://docs.gradle.org/current/userguide/isolated_projects.html
org.gradle.unsafe.isolated-projects=true
#########################################
# Android
# 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
android.uniquePackageNames=true
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.defaults.buildFeatures.buildconfig=false
android.enableBuildConfigAsBytecode=true
android.r8.maxWorkers=2
# Disable features we do not use
android.defaults.buildfeatures.aidl=false
android.defaults.buildfeatures.buildconfig=false
android.defaults.buildfeatures.renderscript=false
android.defaults.buildfeatures.resvalues=false
android.defaults.buildfeatures.shaders=false
#########################################
# Kotlin
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
# New Kotlin IC flags, should become defaults in Kotlin 2.0
kotlin.compiler.suppressExperimentalICOptimizationsWarning=true
kotlin.compiler.keepIncrementalCompilationCachesInMemory=true
kotlin.compiler.preciseCompilationResultsBackup=true
kotlin.incremental=true
kotlin.incremental.useClasspathSnapshot=true
# Try the K2 compiler before it lands as stable
# kotlin.experimental.tryK2=true
# Annotation processors discovery from compile classpath is deprecated
kapt.include.compile.classpath=false