From 4c8b5c699e7bced0a496c0b6899a73599b8b95e5 Mon Sep 17 00:00:00 2001 From: strangepleasures Date: Wed, 24 Jan 2024 14:28:05 +0100 Subject: [PATCH] [KAPT] [CLI] KT-65251 Run Kapt CLI with -Xmx512M by default --- compiler/cli/bin/kapt | 2 ++ compiler/cli/bin/kapt.bat | 1 + 2 files changed, 3 insertions(+) diff --git a/compiler/cli/bin/kapt b/compiler/cli/bin/kapt index 510eabba860..89d21f50342 100755 --- a/compiler/cli/bin/kapt +++ b/compiler/cli/bin/kapt @@ -7,6 +7,8 @@ export KOTLIN_TOOL=kotlin-annotation-processing-cli.jar export KOTLIN_COMPILER=org.jetbrains.kotlin.kapt.cli.KaptCli +[ -n "$JAVA_OPTS" ] || export JAVA_OPTS="-Xmx512M -Xms128M" + DIR="${BASH_SOURCE[0]%/*}" : ${DIR:="."} diff --git a/compiler/cli/bin/kapt.bat b/compiler/cli/bin/kapt.bat index 6839f592a9d..5d672d2c545 100644 --- a/compiler/cli/bin/kapt.bat +++ b/compiler/cli/bin/kapt.bat @@ -6,5 +6,6 @@ rem Use of this source code is governed by the Apache 2.0 license that can be fo setlocal set _KOTLIN_COMPILER=org.jetbrains.kotlin.kapt.cli.KaptCli set _KOTLIN_TOOL=kotlin-annotation-processing-cli.jar +if "%JAVA_OPTS%"=="" set JAVA_OPTS=-Xmx512M -Xms128M call %~dps0kotlinc.bat %*