forked from ktorio/ktor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgradle.properties
More file actions
100 lines (87 loc) · 4.7 KB
/
Copy pathgradle.properties
File metadata and controls
100 lines (87 loc) · 4.7 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
#
# Copyright 2014-2026 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
#
# styleguide
kotlin.code.style=official
# config
group=io.ktor
## Performance
# JVM arguments used to run Gradle Daemon.
# Notes:
# * 'Xmx'
# Default: 6g — sufficient for most module-scoped builds and IDE sync.
# Increase to 10g when using `ktorbuild.syncMode=full` (KTOR-8504).
# Can be reduced to 2-4g, but limits you to module-scoped tasks to avoid OOM.
# * '-Dkotlin.daemon.jvm.option'
# Used for the Kotlin Daemon started by Gradle to compile buildSrc as
# it ignores the value from 'kotlin.daemon.jvmargs'
# * '-XX:MaxMetaspaceSize'
# Prevents Gradle Daemon from being killed due to unbounded usage of metaspace.
# See: https://github.com/gradle/gradle/issues/19750
# Use higher value if experiencing "OutOfMemory: Metaspace": 2g-4g
# The acceptible maximum depends on the number of Gradle workers that are run in parallel.
# The more workers used, the more metaspace memory is consumed.
#
# On CI it is recommended to add the following options:
# * Reduce '-Xmx' as IDE sync is not needed on CI
# * '-Dkotlin.daemon.options=autoshutdownIdleSeconds=30'
# To save some memory, shutting down Kotlin Daemon used for buildSrc compilation after 30 seconds of idle.
# See: https://github.com/gradle/gradle/issues/29331
org.gradle.jvmargs=-Xms2g -Xmx6g -XX:MaxMetaspaceSize=1g -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options="-Xmx512m,Xms256m,-XX:MaxMetaspaceSize=256m,XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.daemon.options="autoshutdownIdleSeconds=1800"
kotlin.daemon.jvmargs=-Xms512m -Xmx2g -XX:MaxMetaspaceSize=256m -XX:+HeapDumpOnOutOfMemoryError
kotlin.native.jvmargs=-Xms512m -Xmx2g -XX:MaxMetaspaceSize=256m -XX:+HeapDumpOnOutOfMemoryError
kotlin.mpp.commonizerJvmArgs=-Xms512m -Xmx2g -XX:MaxMetaspaceSize=256m -XX:+HeapDumpOnOutOfMemoryError
# Gradle Doctor might increase memory consumption when task monitoring is enabled, so it is disabled by default.
# Some features can't work without task monitoring:
# doctor-negative-savings, doctor-slow-build-cache-connection, doctor-slow-maven-connection
# Issue: https://github.com/runningcode/gradle-doctor/issues/348
doctor.enableTaskMonitoring=false
# gradle
org.gradle.daemon=true
org.gradle.caching=true
org.gradle.parallel=true
org.gradle.tooling.parallel=true
org.gradle.configuration-cache=true
org.gradle.configuration-cache.parallel=true
org.gradle.configuration-cache.entries-per-key=3
org.gradle.kotlin.dsl.allWarningsAsErrors=true
# Speeds up the configuration phase but might cause problems with running some tasks on a single module.
# If you experience problems with this flag, try to add `--no-configure-on-demand` or set this flag to `false`
org.gradle.configureondemand=true
# kotlin
kotlin.native.ignoreDisabledTargets=true
kotlin.mpp.stability.nowarn=true
kotlin.mpp.enableCInteropCommonization=true
kotlin.incremental.wasm=true
kotlin.mpp.applyDefaultHierarchyTemplate=false
kotlin.apple.xcodeCompatibility.nowarn=true
# Suppress the following warnings:
# - ConfigurationOnDemandNotSupported - reports that web targets don't support configuration on demand,
# but we've applied a workaround for them
kotlin.suppressGradlePluginWarnings=ConfigurationOnDemandNotSupported
kotlin.daemon.useFallbackStrategy=false
# Disable Klibs x-compilation due to problem with abiCheck in 2.2.20
kotlin.native.enableKlibsCrossCompilation=false
# Android
android.useAndroidX=true
# Cache Redirector
# Redirects repository URLs through JetBrains cache-redirector service (https://cache-redirector.jetbrains.com)
# This is useful for CI/CD environments and restricted networks, but may be slower for local development
# depending on your geographic location. Enable only when needed.
# See: build-settings-logic/src/main/kotlin/ktorsettings.cache-redirector.settings.gradle.kts
#ktorbuild.useCacheRedirector=true
# To enable `ktor-client-webrtc-rs` module set this to `true`
ktorbuild.rustCompilation=false
############ Local-only properties ############
# NOTE: Add these properties to ~/.gradle/gradle.properties if you want to customize them.
# Disable build scans publishing
#ktor.develocity.skipBuildScans=true
# A username to be shown in build scans. Set to '<default>' to show the real username.
#ktor.develocity.username=<default>
# A hostname to be shown in build scans
#ktor.develocity.hostname=
# IDE sync mode:
# - light (default): Excludes native targets from the project model to reduce memory consumption during IDE sync.
# Use `light+<target>` to also include a specific native target, e.g. `light+macosArm64`.
# - full: Includes all targets. Requires increasing 'Xmx' for Gradle Daemon.
#ktorbuild.syncMode=light+macosArm64