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[]
|
// tag::main[]
|
||||||
bootRun {
|
bootRun {
|
||||||
main = 'com.example.ExampleApplication'
|
mainClass = 'com.example.ExampleApplication'
|
||||||
}
|
}
|
||||||
// end::main[]
|
// end::main[]
|
||||||
|
|
||||||
task configuredMainClass {
|
task configuredMainClass {
|
||||||
doLast {
|
doLast {
|
||||||
println bootRun.main
|
println bootRun.mainClass
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,12 +7,12 @@ plugins {
|
||||||
|
|
||||||
// tag::main[]
|
// tag::main[]
|
||||||
tasks.getByName<BootRun>("bootRun") {
|
tasks.getByName<BootRun>("bootRun") {
|
||||||
main = "com.example.ExampleApplication"
|
mainClass.set("com.example.ExampleApplication")
|
||||||
}
|
}
|
||||||
// end::main[]
|
// end::main[]
|
||||||
|
|
||||||
task("configuredMainClass") {
|
task("configuredMainClass") {
|
||||||
doLast {
|
doLast {
|
||||||
println(tasks.getByName<BootRun>("bootRun").main)
|
println(tasks.getByName<BootRun>("bootRun").mainClass)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue