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
91 lines (80 loc) · 4.43 KB
/
gradle.properties
File metadata and controls
91 lines (80 loc) · 4.43 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
#
# Copyright 2014-2025 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:
# * You can reduce '-Xmx' downto '6g' or even '4g', but this could lead to OOM on project sync in an IDE
# while it might be enough for other tasks.
# We use 9 GB by default as it is the minimum value giving us reliable IDE sync (see KTOR-8504)
# * '-Dkotlin.daemon.jvm.option' is used for the Kotlin Daemon started by Gradle to compile buildSrc as it ignores
# the value from 'kotlin.daemon.jvmargs'
# * We cannot specify default '-XX:MaxMetaspaceSize' value as it could lead to "OutOfMemory: Metaspace" problems
# on running BCV tasks. While it is okay to set this value on CI.
# See: https://github.com/Kotlin/binary-compatibility-validator/issues/282
#
# On CI it is recommended to add the following options:
# * Reduce '-Xmx' as IDE sync is not needed on CI
# * '-XX:MaxMetaspaceSize=1g'
# To prevent Gradle Daemon from being killed due to unbounded usage of metaspace.
# See: https://github.com/gradle/gradle/issues/19750
# Value '1g' should be enough if you aren't going to run BCV tasks, otherwise use higher value: 2g-4g
# The acceptible maximum depends on the number of Gradle workers that are run in parallel. The more workers,
# the more metaspace memory is consumed.
# * '-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 -Xmx10g -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.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
kotlin.suppressGradlePluginWarnings=IncorrectCompileOnlyDependencyWarning
kotlin.daemon.useFallbackStrategy=false
# Enable new project model to be prepared for enabling isolated projects
# TODO: Remove when we enable isolated projects in Gradle
kotlin.kmp.isolated-projects.support=enable
# Disable Klibs x-compilation due to problem with abiCheck in 2.2.20
kotlin.native.enableKlibsCrossCompilation=false
# Android
android.useAndroidX=true
# dokka
# workaround for resolving platform dependencies, see https://github.com/Kotlin/dokka/issues/3153
org.jetbrains.dokka.classpath.useNativeDistributionAccessor=true
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
# To enable `ktor-client-webrtc-rs` module set this to `true`
ktorbuild.rustCompilation=false
# 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=