Skip to content

Commit

Permalink
Use mainClass rather than deprecated main in BootRun examples
Browse files Browse the repository at this point in the history
Closes gh-29965
  • Loading branch information
wilkinsona committed Feb 23, 2022
1 parent ee7426a commit 9c9e04b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

0 comments on commit 9c9e04b

Please sign in to comment.