Replace dependency management plugin with Gradle platform dependencies

This commit is contained in:
Roy Clarkson
2020-06-18 17:52:22 -04:00
committed by Roy Clarkson
parent 64171cf4f3
commit aaf5bda2ee
9 changed files with 24 additions and 44 deletions

View File

@@ -21,7 +21,6 @@ buildscript {
}
dependencies {
classpath("io.spring.nohttp:nohttp-gradle:0.0.5.RELEASE")
classpath("io.spring.gradle:dependency-management-plugin:1.0.9.RELEASE")
}
}
@@ -41,14 +40,6 @@ ext {
] as String[]
}
//override managed Spring Boot versions
if (project.hasProperty("springFrameworkVersion")) {
ext['spring-framework.version'] = ext.springFrameworkVersion
}
if (project.hasProperty("reactorVersion")) {
ext['reactor-bom.version'] = ext.reactorVersion
}
description = "Spring Cloud Open Service Broker"
apply plugin: "io.spring.nohttp"
@@ -63,7 +54,6 @@ configure(allprojects) {
apply plugin: "java"
apply plugin: "eclipse"
apply plugin: "idea"
apply plugin: "io.spring.dependency-management"
repositories {
mavenCentral()
@@ -85,8 +75,7 @@ configure(allprojects) {
}
}
}
if (version.endsWith('SNAPSHOT') || project.hasProperty("springFrameworkVersion") ||
project.hasProperty("springBootVersion")) {
if (version.endsWith('SNAPSHOT')) {
repositories {
maven { url "https://repo.spring.io/snapshot" }
}
@@ -170,9 +159,7 @@ configure(subprojects - [project(":spring-cloud-starter-open-service-broker")])
"-Xlint:try",
"-Xlint:fallthrough",
"-Xlint:rawtypes",
// Suppress deprecation warnings when building against latest integration releases
(springBootVersion == "latest.integration" || springFrameworkVersion == "latest.integration")
? "-Xlint:-deprecation" : "-Xlint:deprecation",
"-Xlint:deprecation",
"-Xlint:unchecked",
"-Xlint:options",
"-Werror"

View File

@@ -59,8 +59,11 @@ publishing {
}
}
pom.withXml {
def dependencyManagementNode = asNode().get("dependencyManagement")
asNode().remove(dependencyManagementNode)
def pomNode = asNode()
def dependencyManagementNode = pomNode.get('dependencyManagement')
if (dependencyManagementNode) {
pomNode.remove(dependencyManagementNode)
}
}
}
}

View File

@@ -28,6 +28,7 @@ configurations.archives.artifacts.clear()
apply plugin: 'org.springframework.boot'
dependencies {
implementation enforcedPlatform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
implementation("org.springframework.boot:spring-boot-starter")
implementation("org.springframework.boot:spring-boot-starter-webflux")
implementation(project(":spring-cloud-starter-open-service-broker"))

View File

@@ -28,6 +28,7 @@ configurations.archives.artifacts.clear()
apply plugin: 'org.springframework.boot'
dependencies {
implementation enforcedPlatform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
implementation("org.springframework.boot:spring-boot-starter")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation(project(":spring-cloud-starter-open-service-broker"))

View File

@@ -16,15 +16,12 @@
description = "Spring Cloud Open Service Broker Auto-Configuration"
dependencyManagement {
imports {
mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}"
}
}
dependencies {
// BOM imports - The versions used in these files will override any other versions found in the graph
implementation enforcedPlatform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
annotationProcessor enforcedPlatform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
api(project(":spring-cloud-open-service-broker-core"))
api("org.springframework.boot:spring-boot-starter")
optionalApi("org.springframework.boot:spring-boot-starter-web")
optionalApi("org.springframework.boot:spring-boot-starter-webflux")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")

View File

@@ -18,12 +18,14 @@ import org.springframework.cloud.contract.verifier.config.TestFramework
buildscript {
dependencies {
classpath("io.spring.gradle:dependency-management-plugin:1.0.9.RELEASE")
classpath("org.springframework.cloud:spring-cloud-contract-gradle-plugin:${springCloudContractVersion}")
}
}
description = "Spring Cloud Open Service Broker Contract Tests"
apply plugin: "io.spring.dependency-management"
apply plugin: "groovy"
apply plugin: "spring-cloud-contract"

View File

@@ -30,15 +30,12 @@ ext {
javaxServletApiVersion = "3.1.0"
}
dependencyManagement {
imports {
mavenBom "org.springframework:spring-framework-bom:${springFrameworkVersion}"
mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"
mavenBom "com.fasterxml.jackson:jackson-bom:${jacksonVersion}"
}
}
dependencies {
// BOM imports - The versions used in these files will override any other versions found in the graph
implementation enforcedPlatform("org.springframework:spring-framework-bom:${springFrameworkVersion}")
implementation enforcedPlatform("io.projectreactor:reactor-bom:${reactorVersion}")
implementation enforcedPlatform("com.fasterxml.jackson:jackson-bom:${jacksonVersion}")
compileOnly("javax.servlet:javax.servlet-api:${javaxServletApiVersion}")
api("org.springframework:spring-context")
optionalApi("org.springframework:spring-web")

View File

@@ -27,15 +27,12 @@ configurations {
docs
}
dependencyManagement {
imports {
mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}"
}
}
apply plugin: 'org.asciidoctor.convert'
dependencies {
// BOM imports - The versions used in these files will override any other versions found in the graph
implementation enforcedPlatform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
implementation(project(":spring-cloud-open-service-broker-core"))
implementation("org.springframework.boot:spring-boot-starter")
implementation("org.springframework.boot:spring-boot-starter-security")

View File

@@ -16,13 +16,8 @@
description = "Spring Cloud Open Service Broker Starter"
dependencyManagement {
imports {
mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}"
}
}
dependencies {
api("org.springframework.boot:spring-boot-starter:${springBootVersion}")
api(project(":spring-cloud-open-service-broker-autoconfigure"))
}