plugins {
id 'java'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
}
repositories {
mavenCentral()
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:2020.0.0"
}
}
It would be great to be able to do:
def imports = dependencyManagement.imports
where imports would be a collection of the declared dependencies (in this case, just one item, org.springframework.cloud:spring-cloud-dependencies:2020.0.0), the data type Dependency seems appropriate for that collection.
One use case for the ability to programmatically access the declared imports would be to allow Renovate to discover these dependencies and therefore suggest updates to them, as it does for other gradle-declared dependencies. See https://github.com/renovatebot/renovate/issues/4614
It would be great to have a way to programmatically access dependencyManagement imports in a similar way to how managed versions can be programmatically accessed.
For example, given this
build.gradle
:It would be great to be able to do:
def imports = dependencyManagement.imports
whereimports
would be a collection of the declared dependencies (in this case, just one item,org.springframework.cloud:spring-cloud-dependencies:2020.0.0
), the data type Dependency seems appropriate for that collection.One use case for the ability to programmatically access the declared imports would be to allow Renovate to discover these dependencies and therefore suggest updates to them, as it does for other gradle-declared dependencies. See https://github.com/renovatebot/renovate/issues/4614