diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/gradle/running/boot-run-main.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/gradle/running/boot-run-main.gradle index 3f3ab9e392..6c012eb2cf 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/gradle/running/boot-run-main.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/gradle/running/boot-run-main.gradle @@ -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 } } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/gradle/running/boot-run-main.gradle.kts b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/gradle/running/boot-run-main.gradle.kts index 77d6bd64cd..68e946a3e5 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/gradle/running/boot-run-main.gradle.kts +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/gradle/running/boot-run-main.gradle.kts @@ -7,12 +7,12 @@ plugins { // tag::main[] tasks.getByName("bootRun") { - main = "com.example.ExampleApplication" + mainClass.set("com.example.ExampleApplication") } // end::main[] task("configuredMainClass") { doLast { - println(tasks.getByName("bootRun").main) + println(tasks.getByName("bootRun").mainClass) } }