From cc5c64f9893446643deee5c6302b27ce3dbc12a9 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 9 Jan 2024 10:26:35 +0100 Subject: [PATCH] Try gradle build speedup --- build.gradle | 3 +++ gradle.properties | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/build.gradle b/build.gradle index 256b3d85bee..dded5516cb2 100644 --- a/build.gradle +++ b/build.gradle @@ -357,6 +357,9 @@ tasks.register('generateCitaviSource', XjcTask) { tasks.withType(JavaCompile).configureEach { options.encoding = 'UTF-8' + + // hint by https://docs.gradle.org/current/userguide/performance.html#run_the_compiler_as_a_separate_process + options.fork = true } compileJava { diff --git a/gradle.properties b/gradle.properties index 8e7f633fecd..7de2be111f2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,12 @@ org.gradle.vs.watch=true + +# hint by https://docs.gradle.org/current/userguide/performance.html#increase_the_heap_size org.gradle.jvmargs=-Xmx4096M + +# hint by https://docs.gradle.org/current/userguide/performance.html#enable_configuration_cache +# Does not work: +# - Task `:compileJava` of type `org.gradle.api.tasks.compile.JavaCompile`: cannot serialize object of type 'org.gradle.api.internal.project.DefaultProject', a subtype of 'org.gradle.api.Project', as these are not supported with the configuration cache. +# org.gradle.configuration-cache=false + +# hint by https://docs.gradle.org/current/userguide/performance.html#enable_the_build_cache +org.gradle.caching=true