spring-gradle-plugins / dependency-management-plugin

A Gradle plugin that provides Maven-like dependency management functionality
684 stars 85 forks source link

spring dependency management gradle plugin dependency version jars #373

Closed wvargas10 closed 6 months ago

wvargas10 commented 6 months ago

A bit confused with dependency management which can be imported in two ways

plugins {
  id 'io.spring.dependency-management' version '1.1.4'
}

dependencies {
   implementation platform("org.springframework.boot:spring-boot-dependencies:3.2.1")
}

I can go online in Maven Repository in see which jar versions are included for 'dependencies'. How do I determine which jar versions are included for the 'plugin'?

wilkinsona commented 6 months ago
plugins {
  id 'io.spring.dependency-management' version '1.1.4'
}

This alone doesn't apply any dependency management. It just adds the dependency management plugin to the project. To also apply some dependency management, some further configuration is required:

dependencyManagement {
    imports {
        mavenBom "org.springframework.boot:spring-boot-dependencies:3.2.1"
    }
}

Note that if you apply both the Spring Boot plugin (org.springframework.boot) and the dependency management plugin, the above configuration will be performed automatically. This is a feature of Spring Boot's Gradle plugin.