commit
f8265e3e44
@ -1,16 +1,18 @@
|
||||
import org.springframework.boot.gradle.tasks.bundling.BootJar
|
||||
import org.springframework.boot.gradle.tasks.bundling.BootBuildImage
|
||||
|
||||
plugins {
|
||||
java
|
||||
id("org.springframework.boot") version "{gradle-project-version}"
|
||||
}
|
||||
|
||||
tasks.getByName<BootJar>("bootJar") {
|
||||
mainClassName = "com.example.ExampleApplication"
|
||||
}
|
||||
|
||||
// tag::image-name[]
|
||||
tasks.getByName<BootBuildImage>("bootBuildImage") {
|
||||
imageName = "example.com/library/${project.artifactId}"
|
||||
imageName = "example.com/library/${project.name}"
|
||||
}
|
||||
// end::image-name[]
|
||||
|
||||
tasks.register("bootBuildImageName") {
|
||||
doFirst {
|
||||
println(tasks.getByName<BootBuildImage>("bootBuildImage").imageName)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue