(1.4.x) Remove spring boot duplication in configuration (#800)

* Use SpringBootPlugin.BOM_COORDINATES to define Spring Boot dependencies version
This allows removing 'springBootVersion' so that the actual version can be
set only once in the boot plugin in 'settings.gradle'. This requires adding
the boot plugin to all modules, modules that do not use use 'apply false'
to only add the plugin libraries to the build runtime.
* Replace use of enforcePlarform with platform
This commit is contained in:
Abel Salgado Romero
2023-06-26 16:53:54 +02:00
committed by GitHub
parent ad16ee4e0f
commit 13e0202910
11 changed files with 65 additions and 14 deletions

View File

@@ -26,7 +26,6 @@ buildscript {
immutablesVersion = "2.9.3"
openServiceBrokerVersion = "3.4.2"
pmdVersion = "6.29.0"
springBootVersion = "2.5.14"
springCredhubVersion = "2.2.0"
springFrameworkVersion = "5.3.18"
wiremockVersion = "2.27.2"
@@ -34,7 +33,7 @@ buildscript {
}
plugins {
id "io.spring.nohttp" version "0.0.11"
id 'io.spring.nohttp'
id 'distribution'
id 'jacoco'
}

View File

@@ -1,3 +1,13 @@
pluginManagement {
plugins {
id 'io.spring.nohttp' version "0.0.11"
id 'org.springframework.boot' version "2.5.14"
}
repositories {
gradlePluginPortal()
}
}
rootProject.name = "spring-cloud-app-broker"
include "spring-cloud-app-broker-deployer"

View File

@@ -14,14 +14,16 @@
* limitations under the License.
*/
import org.springframework.boot.gradle.plugin.SpringBootPlugin
plugins {
id 'org.springframework.boot' version "2.5.14"
id 'org.springframework.boot'
}
description = "Spring Cloud App Broker Acceptance Tests"
dependencies {
api enforcedPlatform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
api platform(SpringBootPlugin.BOM_COORDINATES)
api project(":spring-cloud-starter-app-broker-cloudfoundry")
api "org.springframework.boot:spring-boot-starter-webflux"

View File

@@ -14,6 +14,12 @@
* limitations under the License.
*/
import org.springframework.boot.gradle.plugin.SpringBootPlugin
plugins {
id 'org.springframework.boot' apply false
}
description = "Spring Cloud App Broker Autoconfiguration"
java {
@@ -23,11 +29,11 @@ java {
}
dependencies {
annotationProcessor enforcedPlatform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
annotationProcessor platform(SpringBootPlugin.BOM_COORDINATES)
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
annotationProcessor "org.springframework.boot:spring-boot-autoconfigure-processor"
api enforcedPlatform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
api platform(SpringBootPlugin.BOM_COORDINATES)
api project(":spring-cloud-app-broker-core")
api project(":spring-cloud-app-broker-deployer")
api project(":spring-cloud-app-broker-deployer-cloudfoundry")

View File

@@ -14,13 +14,19 @@
* limitations under the License.
*/
import org.springframework.boot.gradle.plugin.SpringBootPlugin
plugins {
id 'org.springframework.boot' apply false
}
description = "Spring Cloud App Broker Core"
dependencies {
api project(":spring-cloud-app-broker-deployer")
api "org.springframework.cloud:spring-cloud-open-service-broker-core:${openServiceBrokerVersion}"
api enforcedPlatform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
api platform(SpringBootPlugin.BOM_COORDINATES)
api "org.springframework:spring-core"
api "org.springframework:spring-context"
api "io.projectreactor:reactor-core"

View File

@@ -14,10 +14,16 @@
* limitations under the License.
*/
import org.springframework.boot.gradle.plugin.SpringBootPlugin
plugins {
id 'org.springframework.boot' apply false
}
description = "Spring Cloud App Broker Deployer Cloud Foundry"
dependencies {
api enforcedPlatform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
api platform(SpringBootPlugin.BOM_COORDINATES)
api project(":spring-cloud-app-broker-deployer")
api "org.cloudfoundry:cloudfoundry-client-reactor:${cfJavaClientVersion}"
api "org.cloudfoundry:cloudfoundry-operations:${cfJavaClientVersion}"

View File

@@ -14,10 +14,16 @@
* limitations under the License.
*/
import org.springframework.boot.gradle.plugin.SpringBootPlugin
plugins {
id 'org.springframework.boot' apply false
}
description = "Spring Cloud App Broker Deployer"
dependencies {
api enforcedPlatform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
api platform(SpringBootPlugin.BOM_COORDINATES)
api "org.springframework:spring-core"
api "io.projectreactor:reactor-core"

View File

@@ -14,7 +14,10 @@
* limitations under the License.
*/
import org.springframework.boot.gradle.plugin.SpringBootPlugin
plugins {
id 'org.springframework.boot' apply false
id 'org.asciidoctor.jvm.pdf' version '3.3.2'
id 'org.asciidoctor.jvm.convert' version '3.3.2'
}
@@ -26,7 +29,7 @@ configurations {
}
dependencies {
implementation enforcedPlatform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
implementation platform(SpringBootPlugin.BOM_COORDINATES)
implementation project(":spring-cloud-app-broker-core")
implementation "org.springframework.boot:spring-boot-starter"
implementation "org.springframework.boot:spring-boot-starter-data-r2dbc"

View File

@@ -13,15 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import org.springframework.boot.gradle.plugin.SpringBootPlugin
plugins {
id 'org.springframework.boot' version "2.5.14"
id 'org.springframework.boot'
}
description = "Spring Cloud App Broker Integration Tests"
dependencies {
implementation enforcedPlatform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
implementation platform(SpringBootPlugin.BOM_COORDINATES)
implementation project(":spring-cloud-starter-app-broker-cloudfoundry")
implementation "org.springframework.boot:spring-boot-starter-webflux"

View File

@@ -14,10 +14,16 @@
* limitations under the License.
*/
import org.springframework.boot.gradle.plugin.SpringBootPlugin
plugins {
id 'org.springframework.boot' apply false
}
description = "Spring Cloud App Broker Logging"
dependencies {
api enforcedPlatform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
api platform(SpringBootPlugin.BOM_COORDINATES)
api "org.springframework.boot:spring-boot-starter-webflux"
api "org.cloudfoundry:cloudfoundry-client-reactor:${cfJavaClientVersion}"
api "org.cloudfoundry:cloudfoundry-operations:${cfJavaClientVersion}"

View File

@@ -14,10 +14,16 @@
* limitations under the License.
*/
import org.springframework.boot.gradle.plugin.SpringBootPlugin
plugins {
id 'org.springframework.boot' apply false
}
description = "Spring Cloud App Broker Security CredHub"
dependencies {
api enforcedPlatform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
api platform(SpringBootPlugin.BOM_COORDINATES)
api project(":spring-cloud-app-broker-core")
api "org.springframework.credhub:spring-credhub-starter:${springCredhubVersion}"
api "org.springframework.cloud:spring-cloud-open-service-broker-core:${openServiceBrokerVersion}"