Skip to content

Commit

Permalink
Merge pull request #37987 from radcortez/fix-37273
Browse files Browse the repository at this point in the history
Do not expand config properties for Gradle Workers
  • Loading branch information
geoand authored Jan 3, 2024
2 parents 394af15 + 1aa4604 commit 11424db
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import io.quarkus.gradle.QuarkusPlugin;
import io.quarkus.gradle.tasks.worker.BuildWorker;
import io.quarkus.maven.dependency.GACTV;
import io.smallrye.config.Expressions;

/**
* Base class for the {@link QuarkusBuildDependencies}, {@link QuarkusBuildCacheableAppParts}, {@link QuarkusBuild} tasks
Expand Down Expand Up @@ -207,12 +208,14 @@ void generateBuild() {

ApplicationModel appModel = resolveAppModelForBuild();
Map<String, String> configMap = new HashMap<>();
for (Map.Entry<String, String> entry : extension().buildEffectiveConfiguration(appModel.getAppArtifact()).configMap()
.entrySet()) {
if (entry.getKey().startsWith("quarkus.")) {
configMap.put(entry.getKey(), entry.getValue());
EffectiveConfig effectiveConfig = extension().buildEffectiveConfiguration(appModel.getAppArtifact());
Expressions.withoutExpansion(() -> {
for (Map.Entry<String, String> entry : effectiveConfig.configMap().entrySet()) {
if (entry.getKey().startsWith("quarkus.")) {
configMap.put(entry.getKey(), effectiveConfig.config().getRawValue(entry.getKey()));
}
}
}
});

getLogger().info("Starting Quarkus application build for package type {}", packageType);

Expand Down

0 comments on commit 11424db

Please sign in to comment.