Skip to content
This repository has been archived by the owner on Oct 8, 2020. It is now read-only.

Commit

Permalink
Upgrade all kinds of dependencies & use kork-bom (#54)
Browse files Browse the repository at this point in the history
* chore(dependencies): Gradle 5, Kotlin 1.3

* chore(dependencies): Use kork-bom instead of spinnaker-dependencies

* chore(dependencies): Use newer kork-bom and spinnaker-gradle-plugin

* fix(build): remove useLastTag from the travis build scripts
  • Loading branch information
robfletcher authored and cfieber committed Apr 23, 2019
1 parent ff5e9a1 commit 7fe3cfb
Show file tree
Hide file tree
Showing 23 changed files with 127 additions and 98 deletions.
49 changes: 25 additions & 24 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,28 @@ buildscript {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "com.netflix.nebula:nebula-kotlin-plugin:$kotlinVersion"
classpath "com.netflix.spinnaker.gradle:spinnaker-gradle-project:4.0.0"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.9.15"
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion"
}
configurations.all {
resolutionStrategy {
eachDependency { details ->
if (details.requested.group == "org.jetbrains.kotlin") {
details.useVersion kotlinVersion
}
}
classpath("com.netflix.spinnaker.gradle:spinnaker-dev-plugin:6.0.0")
if (Boolean.valueOf(enablePublishing)) {
classpath "com.netflix.spinnaker.gradle:spinnaker-gradle-project:6.0.0"
}
}

ext {
korkVersion = "4.0.2"
}
}

plugins {
id("nebula.kotlin").version("1.3.30").apply(false)
id("org.jetbrains.kotlin.plugin.spring").version("1.3.30").apply(false)
id("org.jetbrains.dokka").version("0.9.18").apply(false)
}

allprojects {
apply plugin: "spinnaker.project"
apply plugin: "spinnaker.base-project"
if (Boolean.valueOf(enablePublishing)) {
apply plugin: "spinnaker.project"
}

group = "com.netflix.spinnaker.keiko"
}
Expand All @@ -36,22 +40,19 @@ subprojects {
}

dependencies {
compile "org.slf4j:slf4j-api:1.7.25"
testRuntime "org.slf4j:slf4j-nop:1.7.25"
}

spinnaker {
dependenciesVersion = "0.127.0"
implementation(platform("com.netflix.spinnaker.kork:kork-bom:$korkVersion"))
implementation "org.slf4j:slf4j-api"
testRuntimeOnly "org.slf4j:slf4j-nop"
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

license {
mapping {
kt = "SLASHSTAR_STYLE"
}
}
// license {
// mapping {
// kt = "SLASHSTAR_STYLE"
// }
// }
}

apply from: "$rootDir/gradle/ktlint-root.gradle"
Expand Down
4 changes: 1 addition & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
org.gradle.parallel=true
kotlinVersion=1.2.61
junitVersion=1.2.0
spekVersion=1.1.5
enablePublishing=false
10 changes: 5 additions & 5 deletions gradle/buildViaTravis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@

if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]"
./gradlew -Prelease.useLastTag=true build
./gradlew -PenablePublishing=true -Prelease.travisci=true build --stacktrace
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
./gradlew -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" build snapshot --stacktrace
./gradlew -PenablePublishing=true -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" build snapshot --stacktrace
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
case "$TRAVIS_TAG" in
version-*)
;; # Ignore Spinnaker product release tags.
*-rc\.*)
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" candidate --stacktrace
./gradlew -PenablePublishing=true -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" candidate --stacktrace
;;
*)
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" final --stacktrace
./gradlew -PenablePublishing=true -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" final --stacktrace
;;
esac
else
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
./gradlew -Prelease.useLastTag=true build
./gradlew -PenablePublishing=true build
fi

8 changes: 4 additions & 4 deletions gradle/installViaTravis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
echo -e "Assemble Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]"
./gradlew assemble
./gradlew -PenablePublishing=true assemble
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
echo -e 'Assemble Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
./gradlew -Prelease.travisci=true assemble
./gradlew -PenablePublishing=true -Prelease.travisci=true assemble
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
echo -e 'Assemble Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true assemble
./gradlew -PenablePublishing=true -Prelease.travisci=true assemble
else
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
./gradlew assemble
./gradlew -PenablePublishing=true assemble
fi

15 changes: 5 additions & 10 deletions gradle/kotlin.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,14 @@ allOpen {
annotation("com.netflix.spinnaker.KotlinOpen")
}

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

compileKotlin {
compileTestKotlin {
kotlinOptions {
languageVersion = "1.2"
jvmTarget = "1.8"
languageVersion = "1.3"
}
}
2 changes: 1 addition & 1 deletion gradle/ktlint-root.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ configurations {
}

dependencies {
ktlint "com.github.shyiko:ktlint:0.23.1"
ktlint "com.github.shyiko:ktlint:0.31.0"
}

task ktlintIdea(type: JavaExec, group: "init") {
Expand Down
2 changes: 1 addition & 1 deletion gradle/ktlint.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ configurations {
}

dependencies {
ktlint "com.github.shyiko:ktlint:0.23.1"
ktlint "com.github.shyiko:ktlint:0.31.0"
}

task ktlint(type: JavaExec, group: "verification") {
Expand Down
6 changes: 3 additions & 3 deletions gradle/spek.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

dependencies {
// only needed to run tests in IntelliJ
testCompile "org.junit.platform:junit-platform-runner:$junitVersion"
testImplementation "org.junit.platform:junit-platform-runner"

testRuntime "org.junit.platform:junit-platform-launcher:$junitVersion"
testRuntime "org.jetbrains.spek:spek-junit-platform-engine:$spekVersion"
testRuntimeOnly "org.junit.platform:junit-platform-launcher"
testRuntimeOnly "org.jetbrains.spek:spek-junit-platform-engine"
}

test {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
24 changes: 20 additions & 4 deletions 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,16 +44,16 @@ 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"

warn ( ) {
warn () {
echo "$*"
}

die ( ) {
die () {
echo
echo "$*"
echo
Expand Down Expand Up @@ -155,7 +171,7 @@ if $cygwin ; then
fi

# Escape application args
save ( ) {
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
Expand Down
18 changes: 17 additions & 1 deletion gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem http://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
Expand All @@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

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

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
Expand Down
8 changes: 4 additions & 4 deletions keiko-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apply from: "$rootDir/gradle/spek.gradle"

dependencies {
compile "com.fasterxml.jackson.core:jackson-annotations:${spinnaker.version("jackson")}"
compile "com.fasterxml.jackson.core:jackson-databind:${spinnaker.version("jackson")}"
compile "org.springframework:spring-context:${spinnaker.version("spring")}"
api "com.fasterxml.jackson.core:jackson-annotations"
api "com.fasterxml.jackson.core:jackson-databind"
api "org.springframework:spring-context"

testCompile project(":keiko-test-common")
testImplementation project(":keiko-test-common")
}
4 changes: 2 additions & 2 deletions keiko-mem-spring/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apply from: "$rootDir/gradle/spek.gradle"

dependencies {
compile project(":keiko-mem")
compile project(":keiko-spring")
api project(":keiko-mem")
api project(":keiko-spring")
}
8 changes: 4 additions & 4 deletions keiko-mem/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apply from: "$rootDir/gradle/spek.gradle"

dependencies {
compile project(":keiko-core")
compile "org.threeten:threeten-extra:1.0"
api project(":keiko-core")
api "org.threeten:threeten-extra"

testCompile project(":keiko-tck")
testCompile "org.funktionale:funktionale-partials:1.1"
testImplementation project(":keiko-tck")
testImplementation "org.funktionale:funktionale-partials"
}
4 changes: 2 additions & 2 deletions keiko-redis-spring/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apply from: "$rootDir/gradle/spek.gradle"

dependencies {
compile project(":keiko-redis")
compile project(":keiko-spring")
api project(":keiko-redis")
api project(":keiko-spring")
}
16 changes: 8 additions & 8 deletions keiko-redis/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apply from: "$rootDir/gradle/spek.gradle"

dependencies {
compile project(":keiko-core")
compile "redis.clients:jedis:${spinnaker.version("jedis")}"
compile "com.fasterxml.jackson.core:jackson-databind:${spinnaker.version("jackson")}"
compile "com.fasterxml.jackson.module:jackson-module-kotlin:${spinnaker.version("jackson")}"
compile "org.funktionale:funktionale-partials:1.1"
compile "com.google.guava:guava:${spinnaker.version("guava")}"
api project(":keiko-core")
api "redis.clients:jedis"
api "com.fasterxml.jackson.core:jackson-databind"
api "com.fasterxml.jackson.module:jackson-module-kotlin"
api "org.funktionale:funktionale-partials"
api "com.github.ben-manes.caffeine:guava"

testCompile project(":keiko-tck")
testCompile "com.netflix.spinnaker.kork:kork-jedis-test:${spinnaker.version("kork")}"
testImplementation project(":keiko-tck")
testImplementation "com.netflix.spinnaker.kork:kork-jedis-test"
}
9 changes: 5 additions & 4 deletions keiko-spring/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
apply from: "$rootDir/gradle/spek.gradle"

dependencies {
compile project(":keiko-core")
compile "org.springframework.boot:spring-boot-autoconfigure:${spinnaker.version("springBoot")}"
compile("com.netflix.spinnaker.kork:kork-core:${spinnaker.version("kork")}") {
api project(":keiko-core")
api "org.springframework.boot:spring-boot-autoconfigure"
api("com.netflix.spinnaker.kork:kork-core") {
exclude(module: "logback-classic")
}
api "com.netflix.eureka:eureka-client"

testCompile project(":keiko-test-common")
testImplementation project(":keiko-test-common")
}
4 changes: 2 additions & 2 deletions keiko-tck/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ repositories {
}

dependencies {
compile project(":keiko-core")
compile project(":keiko-test-common")
api project(":keiko-core")
api project(":keiko-test-common")
}
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ abstract class QueueTest<out Q : Queue>(
}
}

it ("retries the message") {
it("retries the message") {
verify(callback).invoke(eq(message), any())
}
}
Expand Down
8 changes: 4 additions & 4 deletions keiko-test-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ repositories {
}

dependencies {
compile "org.jetbrains.spek:spek-api:$spekVersion"
compile "org.jetbrains.spek:spek-subject-extension:$spekVersion"
compile "com.nhaarman:mockito-kotlin:1.5.0"
compile "org.assertj:assertj-core:3.9.0"
api "org.jetbrains.spek:spek-api"
api "org.jetbrains.spek:spek-subject-extension"
api "com.nhaarman:mockito-kotlin"
api "org.assertj:assertj-core"
}
10 changes: 0 additions & 10 deletions settings.gradle

This file was deleted.

Loading

0 comments on commit 7fe3cfb

Please sign in to comment.