Merge pull request #33424 from candrews

* 33424:
  Update instead of replace environment in bootBuildImage documentation

Closes gh-33424
This commit is contained in:
Moritz Halbritter 2022-12-01 11:30:33 +01:00
commit 39a026ed65
4 changed files with 6 additions and 10 deletions

View File

@ -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[]

View File

@ -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[]

View File

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

View File

@ -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[]