Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing replaceLogbackXml in aot build configuration for gradle and maven. #2424

Merged
merged 5 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ protected List<MicronautAotOptimization> optimizations(boolean graalvm, Generato
final List<MicronautAotOptimization> optimizations = new ArrayList<>();
optimizations.add(new MicronautAotOptimization("cached.environment.enabled", true, "Caches environment property values: environment properties will be deemed immutable after application startup."));
optimizations.add(new MicronautAotOptimization("precompute.environment.properties.enabled", true, "Precomputes Micronaut configuration property keys from the current environment variables"));
optimizations.add(new MicronautAotOptimization("logback.xml.to.java.enabled", true, "Replaces logback.xml with a pure Java configuration"));
if (graalvm) {
optimizations.add(new MicronautAotOptimization("yaml.to.java.config.enabled", false, "Converts YAML configuration files to Java configuration"));
optimizations.add(new MicronautAotOptimization("graalvm.config.enabled", true, "Generates GraalVM configuration files required to load the AOT optimizations"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
optimizeClassLoading = true
deduceEnvironment = true
optimizeNetty = true
replaceLogbackXml = true
@if(aotKeys != null) {
@for (String keyName : aotKeys.keySet()) {
configurationProperties.put("@(keyName)","@(aotKeys.get(keyName))")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ class MicronautAotSpec extends ApplicationContextSpec implements CommandOutputFi
output.contains('optimizeClassLoading = true')
output.contains('deduceEnvironment = true')
output.contains('optimizeNetty = true')
output.contains('replaceLogbackXml = true')

where:
[buildTool, language] << [BuildTool.valuesGradle(), Language.values().toList()].combinations()
Expand Down
3 changes: 3 additions & 0 deletions starter-core/src/test/resources/expected-aot-jar.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ cached.environment.enabled=true
# Precomputes Micronaut configuration property keys from the current environment variables
precompute.environment.properties.enabled=true

# Replaces logback.xml with a pure Java configuration
logback.xml.to.java.enabled=true

# Converts YAML configuration files to Java configuration
yaml.to.java.config.enabled=true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ cached.environment.enabled=true
# Precomputes Micronaut configuration property keys from the current environment variables
precompute.environment.properties.enabled=true

# Replaces logback.xml with a pure Java configuration
logback.xml.to.java.enabled=true

# Converts YAML configuration files to Java configuration
yaml.to.java.config.enabled=false

Expand Down
Loading