Skip to content

Commit

Permalink
chore(dependencies): update to spring-boot 2 and dependency managemen…
Browse files Browse the repository at this point in the history
…t via kork-BOM (#543)

* chore(dependencies): initial bump to boot 2 via kork BOM

WIP - this compiles only so far..

* chore(dependencies): kebab-case properties for spring

* chore(dependencies): fix bytebuddy conflict for spock tests

* chore(dependencies): update to boot2 compatible orca/keiko

* chore(dependencies): ensure integrationTests are configured for lombok
  • Loading branch information
cfieber committed Jun 3, 2019
1 parent 30121df commit 5ca1d36
Show file tree
Hide file tree
Showing 68 changed files with 296 additions and 492 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ out/
.settings/
bin/
/dump.rdb
/.vscode/
84 changes: 44 additions & 40 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,45 +22,33 @@ buildscript {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "com.netflix.spinnaker.gradle:spinnaker-dev-plugin:5.1.4"
classpath "com.netflix.spinnaker.gradle:spinnaker-dev-plugin:$spinnakerGradleVersion"
if (Boolean.valueOf(enablePublishing)) {
classpath "com.netflix.spinnaker.gradle:spinnaker-gradle-project:$spinnakerGradleVersion"
}

classpath "com.netflix.nebula:nebula-kotlin-plugin:$kotlinVersion"
}
}

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

ext {
spinnakerDependenciesVersion = '1.44.1'
if (project.hasProperty('spinnakerDependenciesVersion')) {
spinnakerDependenciesVersion = project.property('spinnakerDependenciesVersion')
}
}

def checkLocalVersions = [spinnakerDependenciesVersion: spinnakerDependenciesVersion]
if (ext.has('versions')) {
def extVers = ext.get('versions')
if (extVers instanceof Map) {
checkLocalVersions.putAll(extVers)
}
}

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

spinnaker {
dependenciesVersion = spinnakerDependenciesVersion
}

test {
testLogging {
exceptionFormat = "full"
Expand All @@ -80,36 +68,52 @@ allprojects {
exclude group: 'javax.servlet', module: 'servlet-api'
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
exclude group: 'org.slf4j', module: 'slf4j-simple'
resolutionStrategy {
force 'com.google.guava:guava:20.0'
}
}
}

subprojects { project ->
def licenseExtension = project.extensions.findByName('license')
if (licenseExtension) {
licenseExtension.exclude "**/*.json"
licenseExtension.exclude "**/*.md"
licenseExtension.exclude "**/*.sse"
licenseExtension.exclude "**/*.yml"
project.extensions.findByName('license')?.with {
exclude "**/*.json"
exclude "**/*.md"
exclude "**/*.sse"
exclude "**/*.yml"
}

repositories {
jcenter()
maven { url "https://dl.bintray.com/spinnaker/spinnaker"}
}

//c&p this because NetflixOss reverts it to 1.7 and ends up getting applied last..
project.plugins.withType(JavaBasePlugin) {
JavaPluginConvention convention = project.convention.getPlugin(JavaPluginConvention)
convention.sourceCompatibility = JavaVersion.VERSION_1_8
convention.targetCompatibility = JavaVersion.VERSION_1_8
}

dependencies {
compile spinnaker.dependency('slf4j')
spinnaker.group('test')
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"
}
}

Expand Down
11 changes: 6 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#Fri May 31 16:30:26 UTC 2019
springBootVersion=1.5.10.RELEASE
orcaVersion=6.139.0
spinnakerDependenciesVersion=1.2.2
org.gradle.parallel=true
enablePublishing=false
kotlinVersion=1.3.20
korkVersion=5.4.2
orcaVersion=7.3.2
mathCommonsVersion=3.6.1
org.gradle.parallel=true
korkVersion=5.4.2
keikoVersion=2.10.1
spinnakerGradleVersion=6.0.0
6 changes: 3 additions & 3 deletions gradle/buildViaTravis.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash
# This script will build the project.

GRADLE="./gradlew -I gradle/init-publish.gradle"
GRADLE="./gradlew -PenablePublishing=true"

if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]"
$GRADLE -Prelease.useLastTag=true build
$GRADLE -Prelease.travisci=true build
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
$GRADLE -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" build snapshot --stacktrace
Expand All @@ -23,5 +23,5 @@ elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
esac
else
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
$GRADLE -Prelease.useLastTag=true build
$GRADLE -Prelease.travisci=true build
fi
27 changes: 0 additions & 27 deletions gradle/groovy.gradle

This file was deleted.

15 changes: 0 additions & 15 deletions gradle/init-publish.gradle

This file was deleted.

4 changes: 2 additions & 2 deletions gradle/installViaTravis.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# This script will build the project.

GRADLE="./gradlew -I gradle/init-publish.gradle"
GRADLE="./gradlew -PenablePublishing=true"

if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
echo -e "Assemble Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]"
Expand All @@ -11,7 +11,7 @@ elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
$GRADLE -Prelease.travisci=true -Pskip.loadtest=true -x test assemble
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
echo -e 'Assemble Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
$GRADLE -Prelease.travisci=true -Prelease.useLastTag=true -Pskip.loadtest=true -x test assemble
$GRADLE -Prelease.travisci=true -Pskip.loadtest=true -x test assemble
else
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
$GRADLE -Pskip.loadtest=true assemble
Expand Down
15 changes: 6 additions & 9 deletions gradle/kotlin.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,16 @@
apply plugin: "nebula.kotlin"
apply plugin: "kotlin-spring"

configurations.all {
resolutionStrategy {
eachDependency { details ->
if (details.requested.group == "org.jetbrains.kotlin") {
details.useVersion kotlinVersion
}
}
compileKotlin {
kotlinOptions {
languageVersion = "1.3"
jvmTarget = "1.8"
}
}

compileKotlin {
compileTestKotlin {
kotlinOptions {
languageVersion = "1.2"
languageVersion = "1.3"
jvmTarget = "1.8"
}
}
39 changes: 0 additions & 39 deletions gradle/spek.gradle

This file was deleted.

28 changes: 0 additions & 28 deletions gradle/spock.gradle

This file was deleted.

26 changes: 0 additions & 26 deletions gradle/testViaTravis.sh

This file was deleted.

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Mon Jun 04 12:58:21 PDT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
18 changes: 17 additions & 1 deletion gradlew
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
#
# 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.
#

##############################################################################
##
## Gradle start up script for UN*X
Expand Down Expand Up @@ -28,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Expand Down
Loading

0 comments on commit 5ca1d36

Please sign in to comment.