bjartek
03/18/2018, 7:58 PMCzar
03/18/2018, 8:34 PMplugins {}
block, also dependency management is no longer implicit, you have to explicitly declare it. If you did declare it but haven't used plugins {}
mechanism you can configure it like this:
plugins {
// other stuff
id("org.springframework.boot") version "2.0.0.RELEASE"
id("io.spring.dependency-management") version "1.0.4.RELEASE"
}
// if you declared spring dep management plugin in buildscript use this version:
// configure<DependencyManagementExtension> {
// otherwise, if you declared it in `plugins {}` block, like I show above, following will work:
dependencyManagement {
imports {
mavenBom(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)
}
}
bjartek
03/18/2018, 8:59 PMbjartek
03/18/2018, 9:00 PMbjartek
03/18/2018, 9:20 PMCzar
03/18/2018, 11:03 PMbjartek
03/18/2018, 11:06 PMCzar
03/18/2018, 11:08 PMCzar
03/18/2018, 11:17 PMThat goal according to section 3.2 here is to not declare it in plugins. Is that doc wrong?No, it doesn't say not to declare it, it says not to apply it there, the example declares it in
plugins {}
but specifies apply false
, then the plugin is applied with apply { plugin("io.spring.dependency-management") }
(I've translated the doc to kotlin-dsl, since that seems to be what you're using).