diff --git a/build.gradle b/build.gradle index e6c602b1f..b3faef737 100644 --- a/build.gradle +++ b/build.gradle @@ -34,46 +34,51 @@ allprojects { if (Boolean.valueOf(enablePublishing)) { apply plugin: 'spinnaker.project' } - apply plugin: 'java-library' - apply plugin: 'groovy' - test { - testLogging { - exceptionFormat = 'full' + if (name != "fiat-bom") { + apply plugin: 'java-library' + apply plugin: 'groovy' + + test { + testLogging { + exceptionFormat = 'full' + } + minHeapSize = "512m" + maxHeapSize = "512m" + } + tasks.withType(Javadoc) { + failOnError = false } - minHeapSize = "512m" - maxHeapSize = "512m" - } - tasks.withType(Javadoc) { - failOnError = false - } - tasks.withType(JavaExec) { - if (System.getProperty('DEBUG', 'false') == 'true') { - jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=7103' + tasks.withType(JavaExec) { + if (System.getProperty('DEBUG', 'false') == 'true') { + jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=7103' + } } } } subprojects { project -> - dependencies { - implementation platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion") - compileOnly "org.projectlombok:lombok" - 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" + if (name != "fiat-bom") { + dependencies { + implementation platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion") + compileOnly "org.projectlombok:lombok" + 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" - implementation "org.springframework.boot:spring-boot-properties-migrator" + implementation "org.springframework.boot:spring-boot-properties-migrator" - testImplementation "org.springframework.boot:spring-boot-starter-test" - testImplementation "org.spockframework:spock-core" - testImplementation "org.spockframework:spock-spring" - testImplementation "org.springframework:spring-test" - testImplementation "org.hamcrest:hamcrest-core" - testRuntimeOnly "cglib:cglib-nodep" - testRuntimeOnly "org.objenesis:objenesis" - testImplementation "org.codehaus.groovy:groovy-all" + testImplementation "org.springframework.boot:spring-boot-starter-test" + testImplementation "org.spockframework:spock-core" + testImplementation "org.spockframework:spock-spring" + testImplementation "org.springframework:spring-test" + testImplementation "org.hamcrest:hamcrest-core" + testRuntimeOnly "cglib:cglib-nodep" + testRuntimeOnly "org.objenesis:objenesis" + testImplementation "org.codehaus.groovy:groovy-all" + } } } diff --git a/fiat-bom/fiat-bom.gradle b/fiat-bom/fiat-bom.gradle new file mode 100644 index 000000000..2a7f3e020 --- /dev/null +++ b/fiat-bom/fiat-bom.gradle @@ -0,0 +1,49 @@ +/* + * 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 { + rootProject + .subprojects + .findAll { it != project } + .each { api(project(it.path)) } + } +} diff --git a/settings.gradle b/settings.gradle index bc7221e03..14184366d 100644 --- a/settings.gradle +++ b/settings.gradle @@ -17,6 +17,7 @@ rootProject.name="fiat" include 'fiat-api', + 'fiat-bom', 'fiat-core', 'fiat-file', 'fiat-github',