Compiling again

This commit is contained in:
Gareth Clay
2020-06-17 12:52:48 +01:00
committed by Gareth Clay
parent 7c7c31b950
commit 2ec6bfc4af
13 changed files with 80 additions and 84 deletions

View File

@@ -18,7 +18,7 @@ import java.util.concurrent.ConcurrentHashMap
plugins {
id "io.spring.nohttp"
id "io.spring.dependency-management"
id "io.spring.dependency-management" apply false
}
ext {
@@ -52,6 +52,16 @@ if (!project.hasProperty("onlyShowStandardStreamsOnTestFailure")) {
description = "Spring Cloud App Broker"
allprojects {
apply plugin: "io.spring.nohttp"
afterEvaluate { project ->
if (project.description == null || project.description.isEmpty()) {
throw new InvalidUserDataException("A project description is required for publishing to maven central")
}
}
}
configure(allprojects - documentationProjects) {
apply plugin: "checkstyle"
apply plugin: "pmd"
@@ -86,9 +96,9 @@ configure(allprojects - documentationProjects) {
// }
}
configure(subprojects - starterProjects) {
apply plugin: "java-library"
apply plugin: "jacoco"
configure(codeProjects) {
apply plugin: 'java-library'
apply plugin: "io.spring.dependency-management"
repositories {
mavenCentral()
@@ -103,6 +113,10 @@ configure(subprojects - starterProjects) {
maven { url "https://repo.spring.io/snapshot" }
}
}
}
configure(libraryProjects) {
apply plugin: "jacoco"
sourceCompatibility = 1.8
targetCompatibility = 1.8
@@ -233,18 +247,7 @@ configure(subprojects - starterProjects) {
configurations {
// exclude JUnit 4 globally, in favor of JUnit 5
testImplementation.exclude group: "junit", module: "junit"
}
}
configure(starterProjects) {
apply plugin: 'java-library'
}
allprojects {
afterEvaluate { project ->
if (project.description == null || project.description.isEmpty()) {
throw new InvalidUserDataException("A project description is required for publishing to maven central")
}
testImplementation.exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
}
@@ -252,6 +255,10 @@ def getDocumentationProjects() {
[project(":spring-cloud-app-broker-docs")] as Set
}
def getCodeProjects() {
return starterProjects + libraryProjects + documentationProjects
}
def getStarterProjects() {
[project(":spring-cloud-starter-app-broker"),
project(":spring-cloud-starter-app-broker-cloudfoundry"),
@@ -266,7 +273,7 @@ task api(type: Javadoc) {
group = "Documentation"
description = "Generates aggregated Javadoc API documentation."
title = "${rootProject.description} ${version} API"
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
options.memberLevel = JavadocMemberLevel.PROTECTED
options.author = true
options.header = rootProject.description
options.links(javadocLinks)

View File

@@ -1,8 +1,11 @@
pluginManagement {
plugins {
id "io.spring.dependency-management" version "1.0.9.RELEASE"
id "org.springframework.boot" version "2.2.7.RELEASE"
id "com.jfrog.artifactory" version "4.15.2"
id "io.spring.nohttp" version "0.0.5.RELEASE"
id 'org.asciidoctor.jvm.pdf' version '3.1.0'
id 'org.asciidoctor.jvm.convert' version '3.1.0'
}
}

View File

@@ -14,15 +14,8 @@
* limitations under the License.
*/
buildscript {
repositories {
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
plugins {
id 'org.springframework.boot'
}
description = "Spring Cloud App Broker Acceptance Tests"
@@ -30,21 +23,14 @@ description = "Spring Cloud App Broker Acceptance Tests"
// don't publish the jar for the acceptance tests project
configurations.archives.artifacts.clear()
apply plugin: 'org.springframework.boot'
dependencies {
implementation project(":spring-cloud-starter-app-broker-cloudfoundry")
implementation("org.springframework.boot:spring-boot-starter-webflux")
testImplementation("org.springframework.boot:spring-boot-starter-test") {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("io.projectreactor:reactor-test")
}
// build the test broker from /src into a jar that the tests can deploy
test.dependsOn assemble
// omit the version from the test broker jar file
jar {
archiveVersion = ''
@@ -54,6 +40,9 @@ bootJar {
}
test {
// build the test broker from /src into a jar that the tests can deploy
dependsOn assemble
maxParallelForks = Runtime.runtime.availableProcessors() - 1 ?: 1
// Only run the tests if acceptanceTests is specified

View File

@@ -29,26 +29,28 @@ java {
}
dependencies {
compile project(":spring-cloud-app-broker-core")
compile project(":spring-cloud-app-broker-deployer")
compile project(":spring-cloud-app-broker-deployer-cloudfoundry")
loggingImplementation project(":spring-cloud-app-broker-logging")
compile project(":spring-cloud-app-broker-security-credhub")
compile("org.springframework.boot:spring-boot-starter")
compile("org.cloudfoundry:cloudfoundry-client-reactor:${cfJavaClientVersion}")
compile("org.cloudfoundry:cloudfoundry-operations:${cfJavaClientVersion}")
compile("org.springframework.credhub:spring-credhub-starter:${springCredhubVersion}")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
annotationProcessor("org.springframework.boot:spring-boot-autoconfigure-processor")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
compileOnly "org.immutables:value:2.8.8"
testImplementation("org.springframework.boot:spring-boot-starter-test") {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
implementation project(":spring-cloud-app-broker-core")
implementation project(":spring-cloud-app-broker-deployer")
implementation project(":spring-cloud-app-broker-deployer-cloudfoundry")
implementation project(":spring-cloud-app-broker-security-credhub")
implementation("org.springframework.boot:spring-boot-starter")
implementation("org.springframework.boot:spring-boot-starter-webflux")
implementation("org.cloudfoundry:cloudfoundry-client-reactor:${cfJavaClientVersion}")
implementation("org.cloudfoundry:cloudfoundry-operations:${cfJavaClientVersion}")
implementation("org.springframework.credhub:spring-credhub-starter:${springCredhubVersion}")
loggingImplementation project(":spring-cloud-app-broker-logging")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.boot:spring-boot-starter-webflux")
testImplementation("io.projectreactor.tools:blockhound-junit-platform:${blockHoundVersion}")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
compileJava.dependsOn(processResources)

View File

@@ -30,12 +30,13 @@ dependencyManagement {
}
dependencies {
compile project(":spring-cloud-app-broker-deployer")
compile("org.springframework:spring-core")
compile("org.springframework:spring-context")
compile("io.projectreactor:reactor-core")
compile("org.springframework.cloud:spring-cloud-open-service-broker-core:${openServiceBrokerVersion}")
compile("org.apache.commons:commons-text:1.8")
api("org.springframework.cloud:spring-cloud-open-service-broker-core:${openServiceBrokerVersion}")
implementation project(":spring-cloud-app-broker-deployer")
implementation("org.springframework:spring-core")
implementation("org.springframework:spring-context")
implementation("io.projectreactor:reactor-core")
implementation("org.apache.commons:commons-text:1.8")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}")
testRuntimeOnly("org.junit.platform:junit-platform-launcher:${junitPlatformLauncherVersion}")

View File

@@ -27,11 +27,11 @@ dependencyManagement {
}
dependencies {
compile project(":spring-cloud-app-broker-deployer")
compile("org.cloudfoundry:cloudfoundry-client-reactor:${cfJavaClientVersion}")
compile("org.cloudfoundry:cloudfoundry-operations:${cfJavaClientVersion}")
compile("org.springframework.boot:spring-boot-starter-validation")
compile("org.immutables:value:${immutablesVersion}")
implementation project(":spring-cloud-app-broker-deployer")
implementation("org.cloudfoundry:cloudfoundry-client-reactor:${cfJavaClientVersion}")
implementation("org.cloudfoundry:cloudfoundry-operations:${cfJavaClientVersion}")
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("org.immutables:value:${immutablesVersion}")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")

View File

@@ -23,8 +23,8 @@ dependencyManagement {
}
dependencies {
compile("org.springframework:spring-core")
compile("io.projectreactor:reactor-core")
implementation("org.springframework:spring-core")
implementation("io.projectreactor:reactor-core")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")

View File

@@ -14,15 +14,9 @@
* limitations under the License.
*/
buildscript {
repositories {
maven { url "https://repo.spring.io/plugins-release" }
}
}
plugins {
id 'org.asciidoctor.jvm.pdf' version '3.1.0'
id 'org.asciidoctor.jvm.convert' version '3.1.0'
id 'org.asciidoctor.jvm.pdf'
id 'org.asciidoctor.jvm.convert'
}
description = "Spring Cloud App Broker Documentation"

View File

@@ -28,10 +28,10 @@ ext {
}
dependencies {
compile "org.springframework.boot:spring-boot-starter-webflux"
compile "org.cloudfoundry:cloudfoundry-client-reactor:${cfJavaClientVersion}"
compile "org.cloudfoundry:cloudfoundry-operations:${cfJavaClientVersion}"
compile "org.immutables:value:${immutablesVersion}"
implementation "org.springframework.boot:spring-boot-starter-webflux"
implementation "org.cloudfoundry:cloudfoundry-client-reactor:${cfJavaClientVersion}"
implementation "org.cloudfoundry:cloudfoundry-operations:${cfJavaClientVersion}"
implementation "org.immutables:value:${immutablesVersion}"
testImplementation("org.springframework.boot:spring-boot-starter-test") {
exclude group: 'junit', module: 'junit'

View File

@@ -23,9 +23,9 @@ dependencyManagement {
}
dependencies {
compile project(":spring-cloud-app-broker-core")
compile("org.springframework.credhub:spring-credhub-starter:${springCredhubVersion}")
compile("org.springframework.cloud:spring-cloud-open-service-broker-core:${openServiceBrokerVersion}")
implementation project(":spring-cloud-app-broker-core")
implementation("org.springframework.credhub:spring-credhub-starter:${springCredhubVersion}")
implementation("org.springframework.cloud:spring-cloud-open-service-broker-core:${openServiceBrokerVersion}")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")

View File

@@ -23,11 +23,11 @@ dependencyManagement {
}
dependencies {
compile project(":spring-cloud-starter-app-broker")
compile project(":spring-cloud-app-broker-deployer-cloudfoundry")
compile project(":spring-cloud-app-broker-security-credhub")
compile("org.cloudfoundry:cloudfoundry-client-reactor:${cfJavaClientVersion}")
compile("org.cloudfoundry:cloudfoundry-operations:${cfJavaClientVersion}")
api project(":spring-cloud-starter-app-broker")
implementation project(":spring-cloud-app-broker-deployer-cloudfoundry")
implementation project(":spring-cloud-app-broker-security-credhub")
implementation("org.cloudfoundry:cloudfoundry-client-reactor:${cfJavaClientVersion}")
implementation("org.cloudfoundry:cloudfoundry-operations:${cfJavaClientVersion}")
}
// TODO maven publication

View File

@@ -23,8 +23,8 @@ dependencyManagement {
}
dependencies {
compile project(":spring-cloud-starter-app-broker")
compile project(":spring-cloud-app-broker-logging")
implementation project(":spring-cloud-starter-app-broker")
implementation project(":spring-cloud-app-broker-logging")
}
// TODO maven publication

View File

@@ -23,7 +23,7 @@ dependencyManagement {
}
dependencies {
implementation project(":spring-cloud-app-broker-core")
api project(":spring-cloud-app-broker-core")
implementation project(":spring-cloud-app-broker-autoconfigure")
implementation "org.springframework.cloud:spring-cloud-starter-open-service-broker:${openServiceBrokerVersion}"
}