Skip to content

Commit

Permalink
Merge pull request #39353 from radcortez/quarkus-39316
Browse files Browse the repository at this point in the history
Allow config empty values in the Gradle worker
  • Loading branch information
gsmet authored Mar 12, 2024
2 parents 217bd98 + 22b5cba commit d605973
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,9 @@ void generateBuild() {
SmallRyeConfig config = extension().buildEffectiveConfiguration(appModel.getAppArtifact()).getConfig();
Map<String, String> quarkusProperties = Expressions.withoutExpansion(() -> {
Map<String, String> values = new HashMap<>();
config.getValues("quarkus", String.class, String.class)
.forEach((key, value) -> values.put("quarkus." + key, value));
for (String key : config.getMapKeys("quarkus").values()) {
values.put(key, config.getConfigValue(key).getValue());
}
return values;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
import java.io.IOException;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -51,10 +53,15 @@ public void dumpEffectiveConfiguration() {
List<String> sourceNames = new ArrayList<>();
config.getConfigSources().forEach(configSource -> sourceNames.add(configSource.getName()));

String quarkusConfig = config.getValues("quarkus", String.class, String.class)
Map<String, String> values = new HashMap<>();
for (String key : config.getMapKeys("quarkus").values()) {
values.put(key, config.getConfigValue(key).getValue());
}

String quarkusConfig = values
.entrySet()
.stream()
.map(e -> format("quarkus.%s=%s", e.getKey(), e.getValue())).sorted()
.map(e -> format("%s=%s", e.getKey(), e.getValue())).sorted()
.collect(Collectors.joining("\n ", "\n ", "\n"));
getLogger().lifecycle("Effective Quarkus configuration options: {}", quarkusConfig);

Expand Down

0 comments on commit d605973

Please sign in to comment.