18 lines
411 B
Groovy
18 lines
411 B
Groovy
plugins {
|
|
id 'java'
|
|
id 'org.springframework.boot' version '{gradle-project-version}'
|
|
}
|
|
|
|
// tag::env[]
|
|
tasks.named("bootBuildImage") {
|
|
environment["HTTP_PROXY"] = "http://proxy.example.com"
|
|
environment["HTTPS_PROXY"] = "https://proxy.example.com"
|
|
}
|
|
// end::env[]
|
|
|
|
tasks.register("bootBuildImageEnvironment") {
|
|
doFirst {
|
|
bootBuildImage.environment.get().each { name, value -> println "$name=$value" }
|
|
}
|
|
}
|