# # 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 version=3.1.1 ## 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. # * '-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: # * '-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 -Xmx8g -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options=-Xmx512m,Xms256m,-XX:MaxMetaspaceSize=256m,XX:+HeapDumpOnOutOfMemoryError kotlin.daemon.jvmargs=-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 # 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 # dokka # workaround for resolving platform dependencies, see https://github.com/Kotlin/dokka/issues/3153 org.jetbrains.dokka.classpath.useNativeDistributionAccessor=true # Uncomment to skip attempts to publish Develocity build scans # Add this property to ~/.gradle/gradle.properties to avoid polluting git with unwanted changes #ktor.develocity.skipBuildScans=true # Uncomment to skip adding git tags to Develocity build scan # Add this property to ~/.gradle/gradle.properties to avoid polluting git with unwanted changes #ktor.develocity.skipGitTags=true