Skip to content

Commit

Permalink
feat(kayenta-bom): publish kayenta-bom (#565)
Browse files Browse the repository at this point in the history
This makes downstream dependencies easier.
NOTE: Exposing `orca-bom` which then brings in `kork-bom`
  • Loading branch information
marchello2000 committed Jun 19, 2019
1 parent a1409b6 commit 644f171
Show file tree
Hide file tree
Showing 8 changed files with 119 additions and 65 deletions.
115 changes: 60 additions & 55 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,37 +37,40 @@ allprojects {
if (Boolean.valueOf(enablePublishing)) {
apply plugin: "spinnaker.project"
}
apply plugin: "java-library"
apply plugin: "groovy"
apply plugin: "kotlin"

def localVersions = [korkVersion, orcaVersion].find { it.endsWith('-SNAPSHOT') }
if (localVersions) {
logger.info("Enabling mavenLocal repo for $localVersions")
repositories {
mavenLocal()

if (name != "kayenta-bom") {
apply plugin: "java-library"
apply plugin: "groovy"
apply plugin: "kotlin"

def localVersions = [orcaVersion].find { it.endsWith('-SNAPSHOT') }
if (localVersions) {
logger.info("Enabling mavenLocal repo for $localVersions")
repositories {
mavenLocal()
}
}
}

test {
testLogging {
exceptionFormat = "full"
test {
testLogging {
exceptionFormat = "full"
}
minHeapSize = "512m"
maxHeapSize = "512m"
}
minHeapSize = "512m"
maxHeapSize = "512m"
}

tasks.withType(JavaExec) {
if (System.getProperty('DEBUG', 'false') == 'true') {
jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8191'
tasks.withType(JavaExec) {
if (System.getProperty('DEBUG', 'false') == 'true') {
jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8191'
}
}
}

configurations.all {
exclude group: 'org.mortbay.jetty', module: 'servlet-api'
exclude group: 'javax.servlet', module: 'servlet-api'
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
exclude group: 'org.slf4j', module: 'slf4j-simple'
configurations.all {
exclude group: 'org.mortbay.jetty', module: 'servlet-api'
exclude group: 'javax.servlet', module: 'servlet-api'
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
exclude group: 'org.slf4j', module: 'slf4j-simple'
}
}
}

Expand All @@ -84,36 +87,38 @@ subprojects { project ->
maven { url "https://dl.bintray.com/spinnaker/spinnaker"}
}

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"
testCompileOnly "org.projectlombok:lombok"


implementation "org.slf4j:slf4j-api"
implementation "org.springframework.boot:spring-boot-starter-web"
implementation "com.netflix.spinnaker.kork:kork-swagger"
implementation "org.springframework.boot:spring-boot-properties-migrator"
implementation "com.netflix.spinnaker.orca:orca-core:$orcaVersion"

implementation "com.squareup.retrofit:retrofit"
implementation "com.squareup.retrofit:converter-jackson"
implementation "com.squareup.okhttp:okhttp"
implementation "com.squareup.okhttp:okhttp-urlconnection"
implementation "com.squareup.okhttp:okhttp-apache"

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"
testImplementation "org.codehaus.groovy:groovy-all"
testRuntimeOnly "cglib:cglib-nodep"
testRuntimeOnly "org.objenesis:objenesis"
if (name != "kayenta-bom") {
dependencies {
implementation platform("com.netflix.spinnaker.orca:orca-bom:$orcaVersion")
compileOnly "org.projectlombok:lombok"
annotationProcessor platform("com.netflix.spinnaker.orca:orca-bom:$orcaVersion")
annotationProcessor "org.projectlombok:lombok"
testAnnotationProcessor platform("com.netflix.spinnaker.orca:orca-bom:$orcaVersion")
testAnnotationProcessor "org.projectlombok:lombok"
testCompileOnly "org.projectlombok:lombok"


implementation "org.slf4j:slf4j-api"
implementation "org.springframework.boot:spring-boot-starter-web"
implementation "com.netflix.spinnaker.kork:kork-swagger"
implementation "org.springframework.boot:spring-boot-properties-migrator"
implementation "com.netflix.spinnaker.orca:orca-core"

implementation "com.squareup.retrofit:retrofit"
implementation "com.squareup.retrofit:converter-jackson"
implementation "com.squareup.okhttp:okhttp"
implementation "com.squareup.okhttp:okhttp-urlconnection"
implementation "com.squareup.okhttp:okhttp-apache"

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"
testImplementation "org.codehaus.groovy:groovy-all"
testRuntimeOnly "cglib:cglib-nodep"
testRuntimeOnly "org.objenesis:objenesis"
}
}
}

Expand Down
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#Mon Jun 17 22:31:26 UTC 2019
orcaVersion=7.3.2
orcaVersion=7.11.0
kotlinVersion=1.3.20
enablePublishing=false
spinnakerGradleVersion=6.0.0
korkVersion=5.5.2
mathCommonsVersion=3.6.1
keikoVersion=2.10.1
org.gradle.parallel=true
49 changes: 49 additions & 0 deletions kayenta-bom/kayenta-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.orca:orca-bom:$orcaVersion"))

constraints {
rootProject
.subprojects
.findAll { it != project }
.each { api(project(it.path)) }
}
}
4 changes: 2 additions & 2 deletions kayenta-core/kayenta-core.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ dependencies {
implementation "io.springfox:springfox-swagger-ui:2.9.2"
implementation "io.springfox:springfox-swagger2:2.9.2"

implementation "com.netflix.spinnaker.orca:orca-core:$orcaVersion"
implementation "com.netflix.spinnaker.orca:orca-retrofit:$orcaVersion"
implementation "com.netflix.spinnaker.orca:orca-core"
implementation "com.netflix.spinnaker.orca:orca-retrofit"
implementation "net.lariverosc:jesque-spring:1.0.1"
implementation "net.greghaines:jesque:1.3.1"

Expand Down
2 changes: 1 addition & 1 deletion kayenta-graphite/kayenta-graphite.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ dependencies {

// Apache 2.0 https://github.com/rest-assured/rest-assured/blob/master/LICENSE
integrationTestCompile 'io.rest-assured:rest-assured:3.1.1'
integrationTestAnnotationProcessor platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion")
integrationTestAnnotationProcessor platform("com.netflix.spinnaker.orca:orca-bom:$orcaVersion")
integrationTestAnnotationProcessor "org.projectlombok:lombok"
integrationTestCompileOnly "org.projectlombok:lombok"
}
8 changes: 4 additions & 4 deletions kayenta-orca/kayenta-orca.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ apply from: "$rootDir/gradle/kotlin.gradle"

dependencies {
implementation "com.netflix.spinnaker.keiko:keiko-spring:$keikoVersion"
implementation "com.netflix.spinnaker.orca:orca-queue:$orcaVersion"
implementation "com.netflix.spinnaker.orca:orca-queue-redis:$orcaVersion"
implementation "com.netflix.spinnaker.orca:orca-redis:$orcaVersion"
implementation "com.netflix.spinnaker.orca:orca-queue"
implementation "com.netflix.spinnaker.orca:orca-queue-redis"
implementation "com.netflix.spinnaker.orca:orca-redis"
implementation "org.springframework.boot:spring-boot-starter-actuator"

// TODO(duftler): Move these to spinnaker-dependencies.
testImplementation "com.netflix.spinnaker.orca:orca-test:$orcaVersion"
testImplementation "com.netflix.spinnaker.orca:orca-test"

testImplementation "com.natpryce:hamkrest"
}
2 changes: 1 addition & 1 deletion kayenta-signalfx/kayenta-signalfx.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ dependencies {
// Apache 2.0 https://github.com/rest-assured/rest-assured/blob/master/LICENSE
integrationTestCompile 'io.rest-assured:rest-assured:3.1.1'

integrationTestAnnotationProcessor platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion")
integrationTestAnnotationProcessor platform("com.netflix.spinnaker.orca:orca-bom:$orcaVersion")
integrationTestAnnotationProcessor "org.projectlombok:lombok"
integrationTestCompileOnly "org.projectlombok:lombok"
}
Expand Down
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="kayenta"

include 'kayenta-atlas'
include 'kayenta-aws'
include 'kayenta-bom'
include 'kayenta-core'
include 'kayenta-datadog'
include 'kayenta-gcs'
Expand Down

0 comments on commit 644f171

Please sign in to comment.