Closed
Description
The current docs mix the plugins DSL and legacy plugin application:
https://docs.spring.io/spring-boot/docs/current/gradle-plugin/reference/htmlsingle/
Per the Gradle docs: https://docs.gradle.org/current/userguide/plugins.html#sec:old_plugin_application
With the introduction of the plugins DSL, users should have little reason to use the legacy method of applying plugins. (...)
I think the Spring Boot Gradle Plugin docs should use the plugins DSL consistently since that is the recommended approach from Gradle (my understanding).
So, instead of:
apply plugin: 'java'
apply plugin: 'io.spring.dependency-management'
Do:
plugins {
java
id("org.springframework.boot") version "3.0.2"
id("io.spring.dependency-management") version "1.1.0"
}
The plugins DSL is also what is used when generating a project using Spring Initializr.