diff --git a/build.gradle b/build.gradle index 9be6ab9a829..f8dd07fcef5 100644 --- a/build.gradle +++ b/build.gradle @@ -47,40 +47,43 @@ allprojects { if (Boolean.valueOf(enablePublishing)) { apply plugin: 'spinnaker.project' } - apply plugin: 'java-library' - apply plugin: 'groovy' - apply plugin: 'nebula.kotlin' - sourceSets.main.java.srcDirs = [] - sourceSets.main.groovy.srcDirs += ["src/main/java"] + if (name != "clouddriver-bom") { + apply plugin: 'java-library' + apply plugin: 'groovy' + apply plugin: 'nebula.kotlin' - dependencies { - implementation platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion") + sourceSets.main.java.srcDirs = [] + sourceSets.main.groovy.srcDirs += ["src/main/java"] - annotationProcessor platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion") - annotationProcessor "org.projectlombok:lombok" - testAnnotationProcessor platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion") - testAnnotationProcessor "org.projectlombok:lombok" - } + dependencies { + implementation platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion") - test { - testLogging { - exceptionFormat = 'full' - if (project.hasProperty('slowTest')) { - long slow = 250 - try { - slow = Long.parseLong(project.property('slowTest')) - } catch (Exception ex) { - } - afterTest { desc, result -> - long duration = result.getEndTime() - result.getStartTime() - if (duration > slow) { - logger.warn("test exceeded $slow ms: $desc.className :: $desc.name ($duration milliseconds)") + annotationProcessor platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion") + annotationProcessor "org.projectlombok:lombok" + testAnnotationProcessor platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion") + testAnnotationProcessor "org.projectlombok:lombok" + } + + test { + testLogging { + exceptionFormat = 'full' + if (project.hasProperty('slowTest')) { + long slow = 250 + try { + slow = Long.parseLong(project.property('slowTest')) + } catch (Exception ex) { + } + afterTest { desc, result -> + long duration = result.getEndTime() - result.getStartTime() + if (duration > slow) { + logger.warn("test exceeded $slow ms: $desc.className :: $desc.name ($duration milliseconds)") + } } } + minHeapSize = "512m" + maxHeapSize = "512m" } - minHeapSize = "512m" - maxHeapSize = "512m" } } } diff --git a/clouddriver-bom/clouddriver-bom.gradle b/clouddriver-bom/clouddriver-bom.gradle new file mode 100644 index 00000000000..bf47dbbed6d --- /dev/null +++ b/clouddriver-bom/clouddriver-bom.gradle @@ -0,0 +1,52 @@ +/* + * Copyright 2019 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +apply plugin: "java-platform" +apply plugin: "maven-publish" + +// without this building the pom fails when using the Nebula publishing plugin +configurations { + create("compileOnly") +} + +javaPlatform { + allowDependencies() +} + + +if (Boolean.valueOf(enablePublishing)) { + publishing { + publications { + nebula(MavenPublication) { + from components.javaPlatform + } + } + } +} + +dependencies { + api(platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion")) + + constraints { + api("com.netflix.spinnaker.fiat:fiat-api:$fiatVersion") + api("com.netflix.spinnaker.fiat:fiat-core:$fiatVersion") + + rootProject + .subprojects + .findAll { it != project } + .each { api(project(it.path)) } + } +} diff --git a/settings.gradle b/settings.gradle index 70b0f7c3c10..8f9db1088f1 100644 --- a/settings.gradle +++ b/settings.gradle @@ -47,7 +47,8 @@ include 'cats:cats-core', 'clouddriver-sql', 'clouddriver-sql-mysql', 'clouddriver-web', - 'clouddriver-scattergather' + 'clouddriver-scattergather', + 'clouddriver-bom' include(*gradle.ext.includedCloudProviderProjects) def setBuildFile(project) {