I'm using the Spring Boot framework with Gradle. I know that to include some Spring dependencies I can reference "starters" without explicitly defining the version; the version will be controlled by that version of Spring Boot I choose, which is the version of the Spring Boot Gradle plugin. Example (non-relevant Gradle code is omitted):
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath group: 'org.springframework.boot', name: 'spring-boot-gradle-plugin', version: BOOT_VERSION
classpath group: 'io.spring.gradle', name: 'dependency-management-plugin', version: DEP_MGMT_VERSION
}
}
...
dependencies {
compile 'org.springframework.boot:spring-boot'
testCompile 'org.springframework.boot:spring-boot-starter-test'
}
Notice above that there are no explicit versions defined my for my application dependencies.
Now, let's say I want to include some Spring Cloud and Spring Integration dependencies. For example:
compile 'org.springframework.integration:spring-integration-mqtt:some-version'
compile 'org.springframework.cloud:spring-cloud-netflix-eureka-server:some-other-version'
How can I ensure that the versions I use for those dependencies are compatible with my other Spring Boot dependencies? I cannot leave out the version, so it seems the Gradle plugin is not taking care of these dependencies (maybe it only takes care of those with group org.springframework.boot?).
To put it another way, is there a clean, safe method to ensure that all my Spring dependencies will work together, from Spring Boot, Spring Cloud etc.?