Use mainClass rather than deprecated main in BootRun examples

Closes gh-29965
pull/30000/head
Andy Wilkinson 3 years ago
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…
Cancel
Save