Skip to content

Commit

Permalink
feat(gate-bom): publish gate-bom
Browse files Browse the repository at this point in the history
This simplifies dependency resolution downstream
  • Loading branch information
marchello2000 committed Jun 18, 2019
1 parent 145073e commit fa559e6
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 41 deletions.
84 changes: 43 additions & 41 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,61 +17,63 @@ buildscript {
}

allprojects {
group = "com.netflix.spinnaker.gate"
apply plugin: 'spinnaker.base-project'
if (Boolean.valueOf(enablePublishing)) {
apply plugin: 'spinnaker.project'
}
apply plugin: 'java-library'
apply plugin: 'groovy'

if ([korkVersion, fiatVersion].find { it.endsWith('-SNAPSHOT') }) {
repositories {
mavenLocal()
}
}
if (name != "gate-bom") {
apply plugin: 'java-library'
apply plugin: 'groovy'

repositories {
maven { url 'https://build.shibboleth.net/nexus/content/repositories/releases/' }
maven { url 'https://repository.mulesoft.org/releases/' }
}
if ([korkVersion, fiatVersion].find { it.endsWith('-SNAPSHOT') }) {
repositories {
mavenLocal()
}
}

dependencies {
implementation platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion")
annotationProcessor platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion")
testAnnotationProcessor platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion")
compileOnly "org.projectlombok:lombok"
annotationProcessor "org.projectlombok:lombok"
testAnnotationProcessor "org.projectlombok:lombok"
repositories {
maven { url 'https://build.shibboleth.net/nexus/content/repositories/releases/' }
maven { url 'https://repository.mulesoft.org/releases/' }
}

implementation "org.codehaus.groovy:groovy-all"
implementation "net.logstash.logback:logstash-logback-encoder"
runtimeOnly "org.springframework.boot:spring-boot-properties-migrator"
testRuntime "org.springframework.boot:spring-boot-properties-migrator"
dependencies {
implementation platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion")
annotationProcessor platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion")
testAnnotationProcessor platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion")
compileOnly "org.projectlombok:lombok"
annotationProcessor "org.projectlombok:lombok"
testAnnotationProcessor "org.projectlombok:lombok"

testImplementation "org.spockframework:spock-core"
testImplementation "org.spockframework:spock-spring"
testImplementation "org.springframework.boot:spring-boot-starter-test"
testImplementation "org.hamcrest:hamcrest-core"
testRuntimeOnly "cglib:cglib-nodep"
testRuntimeOnly "org.objenesis:objenesis"
}
implementation "org.codehaus.groovy:groovy-all"
implementation "net.logstash.logback:logstash-logback-encoder"
runtimeOnly "org.springframework.boot:spring-boot-properties-migrator"
testRuntime "org.springframework.boot:spring-boot-properties-migrator"

configurations.all {
exclude group: 'javax.servlet', module: 'servlet-api'
exclude group: 'javax.servlet', module: 'javax.servlet-api'
}
testImplementation "org.spockframework:spock-core"
testImplementation "org.spockframework:spock-spring"
testImplementation "org.springframework.boot:spring-boot-starter-test"
testImplementation "org.hamcrest:hamcrest-core"
testRuntimeOnly "cglib:cglib-nodep"
testRuntimeOnly "org.objenesis:objenesis"
}

tasks.withType(JavaExec) {
if (System.getProperty('DEBUG', 'false') == 'true') {
jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8184'
configurations.all {
exclude group: 'javax.servlet', module: 'servlet-api'
exclude group: 'javax.servlet', module: 'javax.servlet-api'
}
}

group = "com.netflix.spinnaker.gate"
tasks.withType(JavaExec) {
if (System.getProperty('DEBUG', 'false') == 'true') {
jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8184'
}
}

test {
testLogging {
exceptionFormat = 'full'
test {
testLogging {
exceptionFormat = 'full'
}
}
}
}
Expand Down
51 changes: 51 additions & 0 deletions gate-bom/gate-bom.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* 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"))
api(platform("com.netflix.spinnaker.fiat:fiat-api:$fiatVersion"))
api(platform("com.netflix.spinnaker.fiat:fiat-core:$fiatVersion"))

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 @@ -18,6 +18,7 @@ rootProject.name = "gate"

include "gate-core",
"gate-basic",
"gate-bom",
"gate-iap",
"gate-ldap",
"gate-oauth2",
Expand Down

0 comments on commit fa559e6

Please sign in to comment.