Update instead of replace environment in bootBuildImage documentation

Closes gh-32886
See gh-33424
pull/33453/head
Craig Andrews 2 years ago committed by Moritz Halbritter
parent c8d2200fc8
commit 703935612f

@ -5,10 +5,8 @@ plugins {
// tag::env[]
tasks.named("bootBuildImage") {
environment = [
"HTTP_PROXY" : "http://proxy.example.com",
"HTTPS_PROXY": "https://proxy.example.com"
]
environment["HTTP_PROXY"] = "http://proxy.example.com"
environment["HTTPS_PROXY"] = "https://proxy.example.com"
}
// end::env[]

@ -9,10 +9,8 @@ tasks.named("bootJar") {
// tag::env-runtime[]
tasks.named("bootBuildImage") {
environment = [
"BPE_DELIM_JAVA_TOOL_OPTIONS" : " ",
"BPE_APPEND_JAVA_TOOL_OPTIONS" : "-XX:+HeapDumpOnOutOfMemoryError"
]
environment["BPE_DELIM_JAVA_TOOL_OPTIONS"] = " "
environment["BPE_APPEND_JAVA_TOOL_OPTIONS"] = "-XX:+HeapDumpOnOutOfMemoryError"
}
// end::env-runtime[]

@ -5,7 +5,7 @@ plugins {
// tag::env[]
tasks.named("bootBuildImage") {
environment = ["BP_JVM_VERSION" : "17"]
environment["BP_JVM_VERSION"] = "17"
}
// end::env[]

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

Loading…
Cancel
Save