Skip to content

Commit

Permalink
chore(dependencies): update to spring boot 2 and kork BOM dependency …
Browse files Browse the repository at this point in the history
…management (#534)

This updates igor to use the kork BOM as the source of dependency opinions, and updates to spring boot 2.
  • Loading branch information
cfieber authored Apr 25, 2019
1 parent d6e85e3 commit 606f108
Show file tree
Hide file tree
Showing 52 changed files with 333 additions and 275 deletions.
88 changes: 38 additions & 50 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,90 +15,78 @@
*/

buildscript {
ext {
korkVersion = "5.0.0"
fiatVersion = "1.0.0"
}
repositories {
jcenter()
maven { url 'https://spinnaker.bintray.com/gradle/' }
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "com.netflix.spinnaker.gradle:spinnaker-dev-plugin:5.2.2"
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"
}
}
}

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

ext {
spinnakerDependenciesVersion = '1.41.0'
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') }
if (localVersions) {
logger.info("Enabling mavenLocal repo for $localVersions")
repositories {
mavenLocal()
}
}

spinnaker {
dependenciesVersion = spinnakerDependenciesVersion
}
group = "com.netflix.spinnaker.echo"

test {
testLogging {
exceptionFormat = 'full'
}
}

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'
resolutionStrategy {
force 'com.google.guava:guava:20.0'
}
}

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

}

subprojects {
jacoco {
toolVersion = '0.8.1'
toolVersion = '0.8.3'
}

dependencies {
compile spinnaker.dependency('groovy')
compile spinnaker.dependency('guava')
compile spinnaker.dependency('slf4j')
testCompile spinnaker.dependency('spock')
testRuntime spinnaker.dependency('slf4jSimple')
testRuntime "org.slf4j:jcl-over-slf4j:${spinnaker.version('slf4j')}"
}
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"

implementation "org.codehaus.groovy:groovy-all"
implementation "com.github.ben-manes.caffeine:guava"
implementation "com.netflix.spectator:spectator-api"
implementation "org.slf4j:slf4j-api"
implementation "net.logstash.logback:logstash-logback-encoder"
implementation "org.springframework.boot:spring-boot-properties-migrator"

testImplementation "org.spockframework:spock-core"

project.plugins.withType(JavaBasePlugin) {
JavaPluginConvention convention = project.convention.getPlugin(JavaPluginConvention)
convention.sourceCompatibility = JavaVersion.VERSION_1_8
convention.targetCompatibility = JavaVersion.VERSION_1_8
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"
testRuntimeOnly "cglib:cglib-nodep"
testRuntimeOnly "org.objenesis:objenesis"
}
}

Expand Down
11 changes: 8 additions & 3 deletions echo-artifacts/echo-artifacts.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@
*/

dependencies {
compile project(':echo-core')

spinnaker.group("bootWeb")
implementation project(':echo-core')
implementation project(':echo-model')
implementation "com.squareup.retrofit:retrofit"
implementation "com.squareup.retrofit:converter-jackson"
implementation "com.jakewharton.retrofit:retrofit1-okhttp3-client:1.1.0"
implementation "com.netflix.spinnaker.kork:kork-web"
implementation "com.netflix.spinnaker.kork:kork-artifacts"
implementation "org.springframework.boot:spring-boot-starter-web"
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
@ConditionalOnExpression("${keel.enabled:false}")
public class KeelConfig {
@Bean
public LogLevel retrofitLogLevel(@Value("${retrofit.logLevel:BASIC}") String retrofitLogLevel) {
public LogLevel retrofitLogLevel(@Value("${retrofit.log-level:BASIC}") String retrofitLogLevel) {
return LogLevel.valueOf(retrofitLogLevel);
}

@Bean
public Endpoint keelEndpoint(@Value("${keel.baseUrl}") String keelBaseUrl) {
public Endpoint keelEndpoint(@Value("${keel.base-url}") String keelBaseUrl) {
return Endpoints.newFixedEndpoint(keelBaseUrl);
}

Expand Down
40 changes: 21 additions & 19 deletions echo-core/echo-core.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,31 @@
*/

dependencies {
annotationProcessor spinnaker.dependency('lombok')
implementation project(":echo-model")

spinnaker.group("retrofitDefault")
implementation "com.squareup.retrofit:retrofit"
implementation "com.squareup.retrofit:converter-jackson"
implementation "com.jakewharton.retrofit:retrofit1-okhttp3-client:1.1.0"
implementation "com.netflix.spinnaker.kork:kork-web"
implementation "com.netflix.spinnaker.kork:kork-artifacts"
implementation "com.squareup.okhttp:okhttp"
implementation "com.squareup.okhttp:okhttp-urlconnection"
implementation "com.squareup.okhttp:okhttp-apache"

compile project(":echo-model")
implementation "com.netflix.spinnaker.kork:kork-core"
implementation "com.netflix.spinnaker.kork:kork-exceptions"
implementation "com.netflix.spinnaker.kork:kork-security"

compile spinnaker.dependency('kork')
compile spinnaker.dependency('korkArtifacts')
compile spinnaker.dependency('korkExceptions')
compile spinnaker.dependency('korkSecurity')
compile spinnaker.dependency('korkWeb')
implementation "org.springframework.boot:spring-boot-starter-web"
implementation "org.apache.commons:commons-lang3"
implementation "com.netflix.eureka:eureka-client"

compile spinnaker.dependency('bootWeb')
compile spinnaker.dependency('commonsLang')
compile spinnaker.dependency('eurekaClient')
compile spinnaker.dependency('jinjava')
compile spinnaker.dependency('lombok')
compile spinnaker.dependency('retrofit1okHttp3Client')
compile spinnaker.dependency('rxJava')
compile spinnaker.dependency('springContext')
implementation "com.hubspot.jinjava:jinjava"
implementation "io.reactivex:rxjava"
implementation "org.springframework:spring-context"

compile 'commons-io:commons-io:2.5'
implementation 'commons-io:commons-io'

testCompile spinnaker.dependency('spockSpring')
testCompile spinnaker.dependency('springTest')
testImplementation "org.spockframework:spock-spring"
testImplementation "org.springframework:spring-test"
}
7 changes: 3 additions & 4 deletions echo-model/echo-model.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
*/

dependencies {
spinnaker.group("lombok")

compile spinnaker.dependency("kork")
compile spinnaker.dependency("korkArtifacts")
implementation "com.netflix.spinnaker.kork:kork-core"
implementation "com.netflix.spinnaker.kork:kork-artifacts"
implementation "org.springframework:spring-web"
}
34 changes: 19 additions & 15 deletions echo-notifications/echo-notifications.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,23 @@
*/

dependencies {
compile project(':echo-core')
compile project(":echo-pipelinetriggers")
spinnaker.group("test")
spinnaker.group("bootWeb")
spinnaker.group("retrofitDefault")
compile spinnaker.dependency("groovy")
compile spinnaker.dependency("logstashEncoder")
compile spinnaker.dependency("kork")
compile spinnaker.dependency('korkWeb')
compile "javax.mail:mail:1.4.1"
compile "org.springframework.boot:spring-boot-starter-mail:${spinnaker.version('springBoot')}"
compile "org.springframework.boot:spring-boot-starter-freemarker:${spinnaker.version('springBoot')}"
compile "org.jsoup:jsoup:1.8.2"
compile "com.atlassian.commonmark:commonmark:0.9.0"
testCompile "com.icegreen:greenmail:1.4.0"
implementation project(':echo-core')
implementation project(':echo-model')
implementation project(":echo-pipelinetriggers")
implementation "org.springframework.boot:spring-boot-starter-web"
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"
implementation "com.netflix.spinnaker.kork:kork-core"
implementation "com.netflix.spinnaker.kork:kork-artifacts"
implementation "com.netflix.spinnaker.kork:kork-web"
implementation "io.reactivex:rxjava"
implementation "javax.mail:mail:1.4.1"
implementation "org.springframework.boot:spring-boot-starter-mail"
implementation "org.springframework.boot:spring-boot-starter-freemarker"
implementation "org.jsoup:jsoup:1.8.2"
implementation "com.atlassian.commonmark:commonmark:0.9.0"
testImplementation "com.icegreen:greenmail:1.4.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
import retrofit.converter.JacksonConverter;

@Configuration
@ConditionalOnProperty("githubStatus.enabled")
@ConditionalOnProperty("github-status.enabled")
@Slf4j
public class GithubConfig {
@Bean
public Endpoint githubEndpoint(@Value("${githubStatus.endpoint}") String endpoint) {
public Endpoint githubEndpoint(@Value("${github-status.endpoint}") String endpoint) {
return Endpoints.newFixedEndpoint(endpoint);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import retrofit.client.Client
class HipchatConfig {

@Bean
Endpoint hipchatEndpoint(@Value('${hipchat.baseUrl}') String hipchatBaseUrl) {
Endpoint hipchatEndpoint(@Value('${hipchat.base-url}') String hipchatBaseUrl) {
newFixedEndpoint(hipchatBaseUrl)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import static retrofit.Endpoints.newFixedEndpoint;

@Configuration
@ConditionalOnProperty("pagerDuty.enabled")
@ConditionalOnProperty("pager-duty.enabled")
public class PagerDutyConfig {
private static final Logger log = LoggerFactory.getLogger(PagerDutyConfig.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class SlackConfig {
}

@Bean(name="useIncomingWebHook")
boolean useIncomingWebHook(@Value('${slack.token}') String token) {
boolean useIncomingWebHook(@Value('${slack.token:}') String token) {
return StringUtils.isNotBlank(token) && token.count("/") >= 2
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ import retrofit.converter.JacksonConverter
class TwilioConfig {

@Bean
Endpoint twilioEndpoint(@Value('${twilio.baseUrl}') String twilioBaseUrl) {
Endpoint twilioEndpoint(@Value('twilio.base-url') String twilioBaseUrl) {
newFixedEndpoint(twilioBaseUrl)
}

@Bean
TwilioService twilioService(
@Value('${twilio.account}') String username,
@Value('${twilio.token}') String password,
@Value('twilio.account') String username,
@Value('twilio.token') String password,
Endpoint twilioEndpoint,
Client retrofitClient,
RestAdapter.LogLevel retrofitLogLevel) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ abstract class AbstractEventNotificationAgent implements EchoEventListener {
@Autowired(required = false)
protected ObjectMapper mapper

@Value('${spinnaker.baseUrl}')
@Value('${spinnaker.base-url}')
String spinnakerUrl

static Map CONFIG = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import java.util.regex.Pattern;

@Slf4j
@ConditionalOnProperty("githubStatus.enabled")
@ConditionalOnProperty("github-status.enabled")
@Service
public class GithubNotificationAgent extends AbstractEventNotificationAgent {
private ImmutableMap<String, String> STATUSES = ImmutableMap.of(
Expand Down Expand Up @@ -160,6 +160,6 @@ public void setToken(String token) {

@Autowired
private GithubService githubService;
@Value("${githubStatus.token}")
@Value("${github-status.token}")
private String token;
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class NotificationTemplateEngine {
@Autowired
Configuration configuration

@Value('${spinnaker.baseUrl}')
@Value('${spinnaker.base-url}')
String spinnakerUrl

String build(Notification notification, Type type) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ class SlackNotificationAgent extends AbstractEventNotificationAgent {
@Autowired
SlackService slackService

@Value('${slack.token}')
@Value('${slack.token:}')
String token

@Value('${slack.sendCompactMessages:false}')
@Value('${slack.send-compact-messages:false}')
Boolean sendCompactMessages

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import static net.logstash.logback.argument.StructuredArguments.kv

@Slf4j
@Component
@ConditionalOnProperty('pagerDuty.enabled')
@ConditionalOnProperty('pager-duty.enabled')
class PagerDutyNotificationService implements NotificationService {
private static Notification.Type TYPE = Notification.Type.PAGER_DUTY

Expand All @@ -48,7 +48,7 @@ class PagerDutyNotificationService implements NotificationService {
@Autowired
PagerDutyService pagerDuty

@Value('${pagerDuty.token}')
@Value('${pager-duty.token:}')
String token

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ class SlackNotificationService implements NotificationService {
@Autowired
SlackService slack

@Value('${slack.token}')
@Value('${slack.token:}')
String token

@Value('${slack.sendCompactMessages:false}')
@Value('${slack.send-compact-messages:false}')
Boolean sendCompactMessages

@Autowired
Expand Down
Loading

0 comments on commit 606f108

Please sign in to comment.