-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgradle.properties
More file actions
167 lines (126 loc) · 6.34 KB
/
gradle.properties
File metadata and controls
167 lines (126 loc) · 6.34 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
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# =============================================================================
# Gradle Build Performance Optimization
# SPI-478: Optimized configuration for maximum build performance
# =============================================================================
# Kotlin Code Style
kotlin.code.style=official
# =============================================================================
# JVM Settings - Optimized for Gradle Daemon Performance
# =============================================================================
# Memory allocation:
# - 4GB heap for large projects with many dependencies
# - 1GB metaspace for heavy annotation processing and reflection
# - G1GC for better latency and throughput balance
# - Optimized GC settings for build workloads
org.gradle.jvmargs=-Xmx4096m \
-XX:MaxMetaspaceSize=1024m \
-XX:+UseG1GC \
-XX:G1HeapRegionSize=32m \
-XX:+UseStringDeduplication \
-XX:+OptimizeStringConcat \
-XX:+UseCompressedOops \
-XX:+UseCompressedClassPointers \
-Dfile.encoding=UTF-8 \
-Duser.country=US \
-Duser.language=en
# =============================================================================
# Gradle Daemon & Build Performance
# =============================================================================
# Enable Gradle daemon for faster subsequent builds
org.gradle.daemon=true
# Parallel execution - utilize all available CPU cores
# Safe for most projects, significantly improves multi-module builds
org.gradle.parallel=true
# Parallel worker count - optimize for GitHub Actions (2 CPU) and local dev
# Will use min(cpu_count, 4) to avoid resource contention
org.gradle.workers.max=4
# =============================================================================
# Build Caching - Comprehensive Multi-Layer Caching Strategy (SPI-475)
# =============================================================================
# Local build cache - cache task outputs locally
org.gradle.caching=true
# Configuration cache - cache configuration phase (Gradle 6.6+)
# Dramatically improves startup time for subsequent builds
org.gradle.configuration-cache=true
# Configuration cache problems as warnings instead of errors
# Note: Kotlin plugin (as of 2.0.0) generates warnings but cache still works
# These warnings don't prevent caching benefits (301ms cached vs 483ms uncached)
org.gradle.configuration-cache.problems=warn
# File system watching - detect file changes for faster incremental builds
org.gradle.vfs.watch=true
# =============================================================================
# Advanced Build Cache Configuration (SPI-475)
# =============================================================================
# Build cache optimizations
org.gradle.caching.debug=false
org.gradle.configuration-cache.max-problems=100
# Compiler caching improvements
kotlin.compiler.execution.strategy=in-process
kotlin.caching.enabled=true
# Dependency resolution caching
org.gradle.dependency.verification.console=verbose
systemProp.org.gradle.internal.repository.cached.metadata.sources=true
# Cache debugging (enable for troubleshooting)
# org.gradle.caching.debug=true
# org.gradle.internal.tasks.cache.statistics=true
# =============================================================================
# Kotlin Compiler Optimizations
# =============================================================================
# Incremental compilation - only recompile changed files
kotlin.incremental=true
# Use Kotlin daemon for compilation (faster warm-up)
kotlin.daemon.jvmargs=-Xmx2048m -XX:+UseG1GC
# Incremental compilation for kapt (annotation processing)
kapt.incremental.apt=true
# Use worker API for kapt (parallel annotation processing)
kapt.use.worker.api=true
# Include only required classpath entries
kapt.include.compile.classpath=false
# =============================================================================
# Kotlin Multiplatform & Compiler Performance
# =============================================================================
# Kotlin/JS IR backend (faster compilation, better optimization)
kotlin.js.ir.output.granularity=whole-program
# Kotlin MPP hierarchical structure support
kotlin.mpp.enableGranularSourceSetsMetadata=true
# =============================================================================
# Build Performance Tuning
# =============================================================================
# Disable automatic download of sources and documentation
# Set to true if you need them for development
org.gradle.java.installations.auto-download=false
# Disable daemon idle timeout in development (keeps daemon warm)
# Comment out for CI environments to free resources
# org.gradle.daemon.idletimeout=10800000
# Network timeouts for dependency resolution
systemProp.org.gradle.internal.http.connectionTimeout=60000
systemProp.org.gradle.internal.http.socketTimeout=60000
# =============================================================================
# Android/Mobile Development (if needed in future)
# =============================================================================
# Android build optimizations (commented out - not currently needed)
# android.useAndroidX=true
# android.enableJetifier=true
# android.enableBuildCache=true
# =============================================================================
# CI/CD Environment Detection
# =============================================================================
# GitHub Actions optimization - detect CI environment
# These settings are automatically optimized for CI when CI=true
systemProp.idea.active=false
# =============================================================================
# Security & Network
# =============================================================================
# Enable Gradle's dependency verification (optional - can be enabled later)
# dependency.verification.mode=strict
# Prefer HTTPS for repositories
systemProp.org.gradle.internal.repository.initial.backoff=500
# =============================================================================
# Experimental Features
# =============================================================================
# Preview features that may become default in future Gradle versions
# Uncomment to test, but be aware they may change
# Kotlin compiler arguments caching
# kotlin.compiler.execution.strategy=in-process
# Gradle enterprise build cache (for teams with Gradle Enterprise)
# org.gradle.caching.remote=false