From 0bce9d93f917d91252a453144b9af9312ada14a2 Mon Sep 17 00:00:00 2001 From: Roberto Cortez Date: Wed, 13 Sep 2023 14:01:17 +0100 Subject: [PATCH] Prevent recording configuration coming from Gradle --- .../configuration/BuildTimeConfigurationReader.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/deployment/src/main/java/io/quarkus/deployment/configuration/BuildTimeConfigurationReader.java b/core/deployment/src/main/java/io/quarkus/deployment/configuration/BuildTimeConfigurationReader.java index fd33610c90ca0..326fd9c0b924a 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/configuration/BuildTimeConfigurationReader.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/configuration/BuildTimeConfigurationReader.java @@ -1013,8 +1013,8 @@ private Converter getConverter(SmallRyeConfig config, Field field, ConverterT * properties in all profiles (active or not), so it is safe to fall back to different default on another * profile. *
- * We also filter the properties coming from System or Env with the registered roots, because we don't want to - * record properties set by the compiling JVM (or other properties that are only related to the build). + * We also filter the properties coming from System, Env or Build with the registered roots, because we don't + * want to record properties set by the compiling JVM (or other properties that are only related to the build). */ private Set getAllProperties(final Set registeredRoots) { Set properties = new HashSet<>(); @@ -1023,7 +1023,8 @@ private Set getAllProperties(final Set registeredRoots) { } for (ConfigSource configSource : config.getConfigSources()) { - if (configSource instanceof SysPropConfigSource || configSource instanceof EnvConfigSource) { + if (configSource instanceof SysPropConfigSource || configSource instanceof EnvConfigSource + || "PropertiesConfigSource[source=Build system]".equals(configSource.getName())) { for (String property : configSource.getPropertyNames()) { NameIterator ni = new NameIterator(property); if (ni.hasNext() && PropertiesUtil.isPropertyInRoot(registeredRoots, ni)) {