From 37734e490af431b2fc961903ebcafb7662222181 Mon Sep 17 00:00:00 2001 From: nlisker <37422899+nlisker@users.noreply.github.com> Date: Mon, 3 Aug 2026 12:23:16 +0300 Subject: [PATCH 1/5] Initial commit --- .gitignore | 1 - gradle.properties | 27 +++++++++++++++++++++++++++ gradle.properties.template | 6 ++++-- 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 gradle.properties diff --git a/.gitignore b/.gitignore index 99d7d59cd01..892a6fc3d02 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,6 @@ Release/ bin/ build/ dist/ -gradle.properties testbin/ **/Ensemble8/lib/ **/Ensemble8/src/generated/resources/ensemble/search/index/write.lock diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 00000000000..9c7822c4154 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,27 @@ +# +# Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Search for Java installations also in JDK_HOME - required for using the Java Toolchain +org.gradle.java.installations.fromEnv=JDK_HOME \ No newline at end of file diff --git a/gradle.properties.template b/gradle.properties.template index 29f986e8dc1..2a057c4d10d 100644 --- a/gradle.properties.template +++ b/gradle.properties.template @@ -26,8 +26,10 @@ ##################################################################################### # # # This properties file allows for a developer to override various properties used # -# when building JavaFX. Any settings you configure in the gradle.properties file # -# will have precedence over any values specified in the build script itself. # +# when building JavaFX. Place your gradle.properties file in your Gradle user home # +# directory. Any settings you configure in this file will have precedence over the # +# project's properties file (if one exists) and any values specified in the build # +# script itself. # # # ##################################################################################### From cb45860a5b95036c1af08602cd135b38b590c9d0 Mon Sep 17 00:00:00 2001 From: nlisker <37422899+nlisker@users.noreply.github.com> Date: Mon, 3 Aug 2026 12:25:58 +0300 Subject: [PATCH 2/5] Add newline at EOF --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 9c7822c4154..d49637a3f22 100644 --- a/gradle.properties +++ b/gradle.properties @@ -24,4 +24,4 @@ # # Search for Java installations also in JDK_HOME - required for using the Java Toolchain -org.gradle.java.installations.fromEnv=JDK_HOME \ No newline at end of file +org.gradle.java.installations.fromEnv=JDK_HOME From 289074648e65bafd5154333f2691ac7263fbd19b Mon Sep 17 00:00:00 2001 From: nlisker <37422899+nlisker@users.noreply.github.com> Date: Sat, 8 Aug 2026 06:04:19 +0300 Subject: [PATCH 3/5] Rename local properties file and read it --- .gitignore | 3 +++ build.gradle | 19 +++++++++++++++++++ ...mplate => gradle-local.properties.template | 9 +++++---- 3 files changed, 27 insertions(+), 4 deletions(-) rename gradle.properties.template => gradle-local.properties.template (97%) diff --git a/.gitignore b/.gitignore index 892a6fc3d02..97833239b19 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,9 @@ testbin/ **/nbproject/private/ hs_err_pid* +# JavaFX user-local properties for the build +gradle-local.properties + # Ignore webrevs /webrev/ /webrev.zip diff --git a/build.gradle b/build.gradle index 36b6030a903..21c89eef717 100644 --- a/build.gradle +++ b/build.gradle @@ -165,6 +165,24 @@ void loadProperties(String sourceFileName) { } } +/** + * Reads the JavaFX local user properties file (gradle-local.properties). + */ +void loadLocalProperties(String sourceFileName) { + def propFile = new File(sourceFileName) + if (!propFile.canRead()) { + return + } + + def localProps = new Properties() + propFile.withInputStream { localProps.load(it) } + + localProps.forEach((name, value) -> { + ext[name] = value + logger.info("gradle-local.properties: defined $name=$value") + }) +} + /** * Struct used to contain some information passed to the closure * passed to compileTargets. @@ -308,6 +326,7 @@ void setFileTimestamps(Provider archive, Instant instant) { *****************************************************************************/ loadProperties("$projectDir/build.properties") +loadLocalProperties("$projectDir/gradle-local.properties") // If the ../rt-closed directory exists, then we are doing a closed build. // In this case, build and property files will be read from diff --git a/gradle.properties.template b/gradle-local.properties.template similarity index 97% rename from gradle.properties.template rename to gradle-local.properties.template index 2a057c4d10d..626ba840814 100644 --- a/gradle.properties.template +++ b/gradle-local.properties.template @@ -26,10 +26,11 @@ ##################################################################################### # # # This properties file allows for a developer to override various properties used # -# when building JavaFX. Place your gradle.properties file in your Gradle user home # -# directory. Any settings you configure in this file will have precedence over the # -# project's properties file (if one exists) and any values specified in the build # -# script itself. # +# when building JavaFX. Any settings you configure in the gradle-local.properties # +# file will have precedence over any values specified in the build script itself. # +# Don't place Gradle properties (org.gradle.*) or system properties (systemProp.*) # +# here as they will be read too late. Either pass them with -D, set GRADLE_OPTS, # +# or put them in /gradle.properties. # # # ##################################################################################### From 01e12841f73d5965cf8f2014a0d892ef052cc6c3 Mon Sep 17 00:00:00 2001 From: nlisker <37422899+nlisker@users.noreply.github.com> Date: Sat, 8 Aug 2026 06:07:17 +0300 Subject: [PATCH 4/5] Fix whitespace --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 21c89eef717..aaae8a21ab4 100644 --- a/build.gradle +++ b/build.gradle @@ -176,7 +176,7 @@ void loadLocalProperties(String sourceFileName) { def localProps = new Properties() propFile.withInputStream { localProps.load(it) } - + localProps.forEach((name, value) -> { ext[name] = value logger.info("gradle-local.properties: defined $name=$value") From 4f4b1af8c159bc57edc872b15c47c82d573492a1 Mon Sep 17 00:00:00 2001 From: nlisker <37422899+nlisker@users.noreply.github.com> Date: Mon, 10 Aug 2026 16:57:30 +0300 Subject: [PATCH 5/5] Allow CLI args to override local properties --- build.gradle | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.gradle b/build.gradle index aaae8a21ab4..3c2f0e4a42b 100644 --- a/build.gradle +++ b/build.gradle @@ -177,7 +177,12 @@ void loadLocalProperties(String sourceFileName) { def localProps = new Properties() propFile.withInputStream { localProps.load(it) } + def cliProps = gradle.startParameter.projectProperties localProps.forEach((name, value) -> { + if (cliProps.containsKey(name)) { + logger.info("gradle-local.properties: $name overriden by CLI arg") + return + } ext[name] = value logger.info("gradle-local.properties: defined $name=$value") })