Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply dependency-management plugin consistently to the docs #1428

Open
jonatan-ivanov opened this issue Jun 16, 2023 · 1 comment
Open

Apply dependency-management plugin consistently to the docs #1428

jonatan-ivanov opened this issue Jun 16, 2023 · 1 comment

Comments

@jonatan-ivanov
Copy link

@izeye spotted that we have inconsistencies in the Boot docs and the build.gradle file generated by initializr seems inconsistent too.

The Boot documentation recommends adding the dependency-management plugin this way:

plugins {
	id 'java'
	id 'org.springframework.boot' version '3.1.0'
}

apply plugin: 'io.spring.dependency-management'

Initializr does this:

plugins {
  id 'java'
  id 'org.springframework.boot' version '3.1.0'
  id 'io.spring.dependency-management' version '1.1.0'
}

Also, it was called out in the linked discussion that the former is probably better since the org.springframework.boot plugin can manage the version of io.spring.dependency-management.

@wilkinsona
Copy link
Contributor

wilkinsona commented Jun 17, 2023

Also, it was called out in the linked discussion that the former is probably better since the org.springframework.boot plugin can manage the version of io.spring.dependency-management.

If you only use the plugins DSL, the version of org.springframework.boot's transitive dependency on io.spring.dependency-management will be considered as part of Gradle's usual version conflict resolution. The highest version will win.

If you use apply plugin: 'io.spring.dependency-management' the specific version that org.springframework.boot depends upon will be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants