-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgradle.properties
More file actions
65 lines (49 loc) · 2 KB
/
Copy pathgradle.properties
File metadata and controls
65 lines (49 loc) · 2 KB
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
# ==============================
# ? Common Gradle Settings
# ==============================
# Allocate more memory for the Gradle daemon.
# Modern AGP benefits from a large heap when using KSP or Compose.
org.gradle.jvmargs=-Xmx8g -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# Keep the Gradle daemon alive between builds.
org.gradle.daemon=false
# Enable build caching to avoid redundant work.
org.gradle.caching=true
# Enable parallel project execution.
org.gradle.parallel=true
# Configuration on demand (optional, less useful in multi-module builds now).
org.gradle.configureondemand=true
# ==============================
# ? Android-Specific Tweaks
# ==============================
# Modern projects should already be fully AndroidX.
android.useAndroidX=true
android.enableJetifier=false
android.nonTransitiveRClass=false
android.nonFinalResIds=true
android.defaults.buildfeatures.buildconfig=false
android.defaults.buildfeatures.aidl=false
android.defaults.buildfeatures.renderscript=false
android.defaults.buildfeatures.shaders=false
# ==============================
# ? Kotlin & KSP Performance
# ==============================
# Use incremental Kotlin compilation.
kotlin.incremental=true
kotlin.incremental.usePreciseJavaTracking=true
kotlin.code.style=official
# Use Gradle workers for Kotlin compilation.
kotlin.compiler.execution.strategy=daemon
# Optimize Kotlin daemon memory.
kotlin.daemon.jvmargs=-Xmx2g -XX:+UseParallelGC -Dfile.encoding=UTF-8
# KSP incremental build improvements (if you use KSP)
ksp.incremental=true
ksp.useKSP2=true
# Enable dependency verification for security.
gradle.dependency.verification=on
# Enable advanced resource shrinking in release builds.
android.enableResourceOptimizations=true
# Enable safe configuration caching (massive speedups on AGP 8.2+)
org.gradle.configuration-cache=false
org.gradle.configuration-cache.problems=warn
# Use Gradle?s new file system watching for faster incremental builds.
org.gradle.vfs.watch=true