Update Kotlin DSL examples of bootBuildImage to be additive

See gh-41173
This commit is contained in:
Sébastien Deleuze 2024-06-20 09:03:50 +02:00 committed by Moritz Halbritter
parent 365fdfee45
commit a6f1bb9590
3 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@ plugins {
// tag::env[]
tasks.named<BootBuildImage>("bootBuildImage") {
environment.set(mapOf("HTTP_PROXY" to "http://proxy.example.com",
environment.putAll(mapOf("HTTP_PROXY" to "http://proxy.example.com",
"HTTPS_PROXY" to "https://proxy.example.com"))
}
// end::env[]

View File

@ -7,7 +7,7 @@ plugins {
// tag::env-runtime[]
tasks.named<BootBuildImage>("bootBuildImage") {
environment.set(mapOf(
environment.putAll(mapOf(
"BPE_DELIM_JAVA_TOOL_OPTIONS" to " ",
"BPE_APPEND_JAVA_TOOL_OPTIONS" to "-XX:+HeapDumpOnOutOfMemoryError"
))

View File

@ -7,7 +7,7 @@ plugins {
// tag::env[]
tasks.named<BootBuildImage>("bootBuildImage") {
environment.set(environment.get() + mapOf("BP_JVM_VERSION" to "17"))
environment.put("BP_JVM_VERSION", "17")
}
// end::env[]