我需要從類似于 org.springframework.boot.spring-boot-dependencies 的 BOM 中獲取像“jackson.version”這樣的屬性。我知道我可以通過使用 dependencyManagement.importedProperties 使用 io.spring.dependency-management 插件來做到這一點。但是 Gradle 的 5 Maven BOM 支持有什么辦法呢?這是 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"]}")}我想對 Gradle 5 做同樣的事情:dependencies { implementation(platform("org.springframework.cloud:spring-cloud-dependencies:Greenwich.RELEASE}")) implementation("org.group:artifact:${?["spring-cloud-aws.version"]}")}如何獲取“spring-cloud-aws.version”(BOM 中的任何屬性)?
添加回答
舉報
0/150
提交
取消