Use mainClass rather than deprecated main in BootRun examples
Closes gh-29965
This commit is contained in:
parent
ee7426a555
commit
9c9e04b8e4
|
@ -5,12 +5,12 @@ plugins {
|
|||
|
||||
// tag::main[]
|
||||
bootRun {
|
||||
main = 'com.example.ExampleApplication'
|
||||
mainClass = 'com.example.ExampleApplication'
|
||||
}
|
||||
// end::main[]
|
||||
|
||||
task configuredMainClass {
|
||||
doLast {
|
||||
println bootRun.main
|
||||
println bootRun.mainClass
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,12 +7,12 @@ plugins {
|
|||
|
||||
// tag::main[]
|
||||
tasks.getByName<BootRun>("bootRun") {
|
||||
main = "com.example.ExampleApplication"
|
||||
mainClass.set("com.example.ExampleApplication")
|
||||
}
|
||||
// end::main[]
|
||||
|
||||
task("configuredMainClass") {
|
||||
doLast {
|
||||
println(tasks.getByName<BootRun>("bootRun").main)
|
||||
println(tasks.getByName<BootRun>("bootRun").mainClass)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue