Is there any replacement of dependencyManagement.importedProperties in Gradle 5?

I need to get a property like “jackson.version” from a BOM similar to org.springframework.boot.spring-boot-dependencies. I know I can do this with io.spring.dependency-management plugin by using dependencyManagement.importedProperties. But what is a way to this with Gradle’s 5 Maven BOM support?

This is an example with io.spring.dependency-management(Kotlin DSL):

dependencyManagement {
    imports {
        mavenBom("org.springframework.cloud:spring-cloud-dependencies:Greenwich.RELEASE")
    }
}

dependencies {
    implementation("org.group:artifact:${dependencyManagement.importedProperties["spring-cloud-aws.version"]}")
}

I’d like to do the same with Gradle 5:

dependencies {
    implementation(platform("org.springframework.cloud:spring-cloud-dependencies:Greenwich.RELEASE}"))
    implementation("org.group:artifact:${?["spring-cloud-aws.version"]}")
}

How to get “spring-cloud-aws.version”(any property from the BOM)?

1 Like