Skip to content

Commit

Permalink
feat(fiat-bom): publish fiat-bom (#429)
Browse files Browse the repository at this point in the history
This simplifies dependency resolution downstream
  • Loading branch information
marchello2000 authored Jun 18, 2019
1 parent f6893a0 commit ffefe34
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 30 deletions.
65 changes: 35 additions & 30 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}

Expand Down
49 changes: 49 additions & 0 deletions fiat-bom/fiat-bom.gradle
Original file line number Diff line number Diff line change
@@ -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)) }
}
}
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
rootProject.name="fiat"

include 'fiat-api',
'fiat-bom',
'fiat-core',
'fiat-file',
'fiat-github',
Expand Down

0 comments on commit ffefe34

Please sign in to comment.