From 7d6fcb50d8265207edd18dd4874dcb4422095472 Mon Sep 17 00:00:00 2001 From: denny Date: Fri, 20 Nov 2026 04:25:26 -0500 Subject: [PATCH] #2721 Gradle run task keeps the default JVM arguments when adding the splash screen Calling jvmArgs on the run task replaced the applicationDefaultJvmArgs convention, dropping --add-modules=jdk.incubator.vector, --enable-preview and the other defaults. The splash argument is now added through a jvmArgumentProvider. Co-Authored-By: Claude Opus 5.5 --- build.gradle | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 537fd3cca..b440b02b1 100644 --- a/build.gradle +++ b/build.gradle @@ -232,8 +232,14 @@ application { } } +/** + * Adds the splash screen to the run task through an argument provider. Calling jvmArgs here would replace the + * applicationDefaultJvmArgs convention (--add-modules=jdk.incubator.vector, --enable-preview, etc.) instead of adding + * to it. + */ tasks.named('run') { - jvmArgs "-splash:${file(splashResourceDir + '/' + splashImages[0]).absolutePath}" + def splashImage = file(splashResourceDir + '/' + splashImages[0]).absolutePath + jvmArgumentProviders.add({ ["-splash:${splashImage}".toString()] } as CommandLineArgumentProvider) } test {