Skip to content

Commit

Permalink
chore(dependencies): Boot 2 and the BOM
Browse files Browse the repository at this point in the history
  • Loading branch information
robfletcher committed May 9, 2019
1 parent e9e731c commit a1de32d
Show file tree
Hide file tree
Showing 115 changed files with 615 additions and 570 deletions.
83 changes: 29 additions & 54 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,86 +21,61 @@ buildscript {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "com.netflix.spinnaker.gradle:spinnaker-dev-plugin:5.2.2"
classpath "com.netflix.nebula:nebula-kotlin-plugin:$kotlinVersion"
classpath "org.jetbrains.kotlin:kotlin-allopen:$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"
}
classpath "com.netflix.nebula:nebula-kotlin-plugin:1.3.31"
classpath "org.jetbrains.kotlin:kotlin-allopen:1.3.31"
}
}

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

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

def checkLocalVersions = [spinnakerDependenciesVersion: spinnakerDependenciesVersion]
if (ext.has('versions')) {
def extVers = ext.get('versions')
if (extVers instanceof Map) {
checkLocalVersions.putAll(extVers)
tasks.withType(JavaExec) {
if (System.getProperty('DEBUG', 'false') == 'true') {
jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8183'
}
}
}

subprojects {
apply plugin: "java-library"

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

spinnaker {
dependenciesVersion = spinnakerDependenciesVersion
}

test {
testLogging {
exceptionFormat = 'full'
}
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"))
implementation("org.slf4j:slf4j-api")
}

configurations.all {
exclude group: "javax.servlet", module: "servlet-api"
exclude group: "org.slf4j", module: "slf4j-log4j12"
exclude group: "org.slf4j", module: "slf4j-simple"
resolutionStrategy {
force "org.antlr:antlr-runtime:3.5.2"
eachDependency {
if (it.requested.group.startsWith("com.fasterxml.jackson")) {
it.useVersion spinnaker.version('jackson')
}
if (it.requested.group == "com.netflix.rxjava" && it.requested.name == "rxjava-core") {
it.useTarget group: "io.reactivex", name: "rxjava", version: spinnaker.version("rxJava")
}
if (it.requested.group == "asm" || it.requested.group == "org.ow2.asm") {
it.useTarget group: "org.ow2.asm", name: "asm-all", version: "5.0.3"
}
if (it.requested.group == "cglib" || it.requested.name == "cglib") {
it.useTarget group: "cglib", name: "cglib", version: "3.1"
}
if (it.requested.group == "antlr") {
it.useTarget group: "org.antlr", name: it.requested.name, version: "3.5.2"
}
if (it.requested.group == "org.apache.xbean") {
it.useVersion "4.1"
}
}
}
}

tasks.withType(JavaExec) {
if (System.getProperty('DEBUG', 'false') == 'true') {
jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8183'
test {
testLogging {
exceptionFormat = "full"
}
}
}
subprojects {

def licenseExtension = project.extensions.findByName('license')
if (licenseExtension != null) {
licenseExtension.exclude "**/*.json"
Expand Down
10 changes: 4 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
#
org.gradle.parallel=true

kotlinVersion=1.2.41
junitVersion=1.2.0
jupiterVersion=5.0.2
junitLegacyVersion=4.12.0
spekVersion=1.1.5
keikoVersion=2.9.8
enablePublishing=false

keikoVersion=2.10.1
fiatVersion=1.0.4
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 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}" -x test build snapshot --stacktrace
Expand All @@ -23,6 +23,6 @@ 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 build
fi

8 changes: 5 additions & 3 deletions gradle/groovy.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
apply plugin: "groovy"

dependencies {
compile spinnaker.dependency("groovy")
spinnaker.group("spockBase")
testCompile spinnaker.dependency("groovy")
implementation("org.codehaus.groovy:groovy-all")
testImplementation("org.spockframework:spock-core")
testImplementation("cglib:cglib-nodep")
testImplementation("org.objenesis:objenesis")
testImplementation("org.codehaus.groovy:groovy-all")
}
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
19 changes: 6 additions & 13 deletions gradle/kotlin.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +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.2"
languageVersion = "1.3"
jvmTarget = "1.8"
}
}

kapt {
mapDiagnosticLocations = true
compileTestKotlin {
kotlinOptions {
languageVersion = "1.3"
jvmTarget = "1.8"
}
}
22 changes: 11 additions & 11 deletions gradle/spek.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ repositories {
}

dependencies {
testCompile "org.junit.platform:junit-platform-runner:$junitVersion"
testCompile "org.jetbrains.spek:spek-api:$spekVersion"
testCompile "org.jetbrains.spek:spek-subject-extension:$spekVersion"
testCompile "com.nhaarman:mockito-kotlin:1.5.0"
testCompile "org.assertj:assertj-core:3.9.0"
testCompile "org.junit.jupiter:junit-jupiter-api:$jupiterVersion"
testImplementation("org.junit.platform:junit-platform-runner")
testImplementation("org.jetbrains.spek:spek-api")
testImplementation("org.jetbrains.spek:spek-subject-extension")
testImplementation("com.nhaarman:mockito-kotlin")
testImplementation("org.assertj:assertj-core")
testImplementation("org.junit.jupiter:junit-jupiter-api")

testRuntime "org.junit.platform:junit-platform-launcher:$junitVersion"
testRuntime "org.junit.jupiter:junit-jupiter-engine:$jupiterVersion"
testRuntime "org.junit.vintage:junit-vintage-engine:$junitLegacyVersion"
testRuntime "org.jetbrains.spek:spek-junit-platform-engine:$spekVersion"
testCompile "io.strikt:strikt-core:0.11.5"
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine")
testRuntimeOnly("org.jetbrains.spek:spek-junit-platform-engine")
testImplementation("io.strikt:strikt-core")
}

test {
Expand Down
6 changes: 4 additions & 2 deletions gradle/spock.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@
apply plugin: "groovy"

dependencies {
spinnaker.group("spockBase")
testCompile spinnaker.dependency("groovy")
testImplementation("org.spockframework:spock-core")
testImplementation("cglib:cglib-nodep")
testImplementation("org.objenesis:objenesis")
testImplementation("org.codehaus.groovy:groovy-all")
}

tasks.compileGroovy.enabled = false
16 changes: 10 additions & 6 deletions orca-applications/orca-applications.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@
apply from: "$rootDir/gradle/groovy.gradle"

dependencies {
compile project(":orca-clouddriver")
compile project(":orca-front50")
compile project(":orca-retrofit")
compileOnly spinnaker.dependency('lombok')
annotationProcessor spinnaker.dependency('lombok')
testCompile project(":orca-test-groovy")
implementation(project(":orca-core"))
implementation(project(":orca-clouddriver"))
implementation(project(":orca-front50"))
implementation(project(":orca-retrofit"))
implementation("com.netflix.spinnaker.fiat:fiat-core:$fiatVersion")

compileOnly("org.projectlombok:lombok")
annotationProcessor("org.projectlombok:lombok")

testImplementation(project(":orca-test-groovy"))
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
package com.netflix.spinnaker.orca.applications.tasks

import com.fasterxml.jackson.databind.ObjectMapper
import com.netflix.spinnaker.fiat.model.Authorization
import com.netflix.spinnaker.fiat.model.resources.Permissions
import com.netflix.spinnaker.orca.ExecutionStatus
import com.netflix.spinnaker.orca.front50.Front50Service
import com.netflix.spinnaker.orca.front50.model.Application
Expand Down
22 changes: 14 additions & 8 deletions orca-bakery/orca-bakery.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,18 @@
apply from: "$rootDir/gradle/groovy.gradle"

dependencies {
compile project(":orca-retrofit")
compile project(":orca-front50")
spinnaker.group('jackson')
compile spinnaker.dependency('jacksonGuava')
compileOnly spinnaker.dependency('lombok')
annotationProcessor spinnaker.dependency("lombok")
testCompile project(":orca-test-groovy")
testCompile "com.github.tomakehurst:wiremock:2.15.0"
implementation(project(":orca-core"))
implementation(project(":orca-retrofit"))
implementation(project(":orca-front50"))
implementation("com.fasterxml.jackson.core:jackson-annotations")
implementation("com.fasterxml.jackson.core:jackson-core")
implementation("com.fasterxml.jackson.core:jackson-databind")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-guava")
implementation("com.netflix.spinnaker.fiat:fiat-core:$fiatVersion")

compileOnly("org.projectlombok:lombok")
annotationProcessor("org.projectlombok:lombok")

testImplementation(project(":orca-test-groovy"))
testImplementation("com.github.tomakehurst:wiremock:2.15.0")
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import com.fasterxml.jackson.annotation.JsonAnySetter
import com.fasterxml.jackson.annotation.JsonInclude
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.databind.PropertyNamingStrategy
import static com.fasterxml.jackson.databind.PropertyNamingStrategy.*
import com.netflix.spinnaker.kork.artifacts.model.Artifact
import groovy.transform.CompileStatic
import groovy.transform.Immutable
Expand All @@ -30,11 +31,13 @@ import groovy.transform.Immutable
*
* @see BakeryService#createBake
*/
@Immutable(copyWith = true)
@Immutable(
copyWith = true,
knownImmutables = ["other"] // fletch: this is a hack since an upgrade of Groovy started replacing "other" with an unmodifiable map breaking @JsonAnySetter
)
@CompileStatic
class BakeRequest {
private static final PropertyNamingStrategy.LowerCaseWithUnderscoresStrategy lowerCaseWithUnderscoresStrategy =
new PropertyNamingStrategy.LowerCaseWithUnderscoresStrategy()
private static final PropertyNamingStrategyBase namingStrategy = new SnakeCaseStrategy()

static final Default = new BakeRequest(user: System.getProperty("user.name"),
cloudProviderType: CloudProviderType.aws,
Expand Down Expand Up @@ -63,18 +66,14 @@ class BakeRequest {
@JsonInclude(JsonInclude.Include.NON_NULL)
Integer rootVolumeSize

private Map<String, Object> other = new HashMap<String, Object>()
@JsonAnySetter
Map<String, Object> other = new HashMap<>()

@JsonAnyGetter
public Map<String, Object> other() {
return other
}

@JsonAnySetter
public void set(String name, Object value) {
other.put(lowerCaseWithUnderscoresStrategy.translate(name), value)
}

static enum CloudProviderType {
aws, azure, docker, gce, openstack, titus, oracle
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class BakeryConfiguration {
@Autowired LogLevel retrofitLogLevel

@Bean
Endpoint bakeryEndpoint(@Value('${bakery.baseUrl}') String bakeryBaseUrl) {
Endpoint bakeryEndpoint(@Value('${bakery.base-url}') String bakeryBaseUrl) {
newFixedEndpoint(bakeryBaseUrl)
}

Expand Down
Loading

0 comments on commit a1de32d

Please sign in to comment.