Skip to content

Commit

Permalink
Dependency upgrades (#4068)
Browse files Browse the repository at this point in the history
* Update dependencies

* Revert kotlin and neo4j version changes

* Fix usages of systemlambda

* Revert logbook netty upgrade

Co-authored-by: jameskleeh <james.kleeh@gmail.com>
  • Loading branch information
micronaut-build and jameskleeh authored Sep 10, 2020
1 parent 0b9db5a commit c928858
Show file tree
Hide file tree
Showing 15 changed files with 48 additions and 57 deletions.
2 changes: 1 addition & 1 deletion benchmarks/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "me.champeau.gradle.jmh" version "0.5.0"
id "me.champeau.gradle.jmh" version "0.5.1"
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:6.0.0'
classpath "io.micronaut.build:micronaut-gradle-plugins:2.0.8"
classpath "io.micronaut.build:micronaut-gradle-plugins:2.0.10"
classpath "gradle.plugin.org.aim42:htmlSanityCheck:$htmlSanityCheckVersion"
classpath 'javax.xml.bind:jaxb-api:2.3.1'
}
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ micronautLiquibaseVersion=2.0.0
micronautFlywayVersion=2.0.2
micronautDiscoveryClientVersion=2.0.1
micronautElasticSearchVersion=2.0.0
micronautDocsVersion=1.0.23
micronautDocsVersion=1.0.24
micronautRssVersion=2.1.0
micronautKubernetesVersion=2.0.0
micronautServletVersion=1.0.2
Expand All @@ -93,7 +93,7 @@ gormVersion=7.1.0.M2
gormHibernateVersion=7.1.0.M1
grailsVersion=3.2.9
groovyVersion=3.0.3
jacksonVersion=2.11.1
jacksonVersion=2.11.2
lettuceVersion=5.3.1.RELEASE
nettyVersion=4.1.48.Final
reactivePgClientVersion=0.11.4
Expand Down
4 changes: 2 additions & 2 deletions gradle/geb.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dependencies {
testImplementation "org.gebish:geb-spock:$gebVersion"
testImplementation "org.seleniumhq.selenium:htmlunit-driver:2.41.0"
testRuntimeOnly 'net.sourceforge.htmlunit:htmlunit:2.41.0'
testImplementation "org.seleniumhq.selenium:htmlunit-driver:2.43.1"
testRuntimeOnly 'net.sourceforge.htmlunit:htmlunit:2.43.0'
testImplementation "org.seleniumhq.selenium:selenium-remote-driver:$seleniumVersion"
testImplementation "org.seleniumhq.selenium:selenium-api:$seleniumVersion"
testImplementation "org.seleniumhq.selenium:selenium-support:$seleniumVersion"
Expand Down
2 changes: 1 addition & 1 deletion http-client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies {
testImplementation project(":inject")
testImplementation dependencyVersion("rxjava2")
testImplementation project(":http-server-netty")
testImplementation "com.github.tomakehurst:wiremock-jre8:2.26.3"
testImplementation "com.github.tomakehurst:wiremock-jre8:2.27.1"
testImplementation dependencyModuleVersion("micronaut.test", "micronaut-test-junit5"), {
exclude module:'micronaut-runtime'
exclude module:'micronaut-inject'
Expand Down
4 changes: 2 additions & 2 deletions http/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
dependencies {
annotationProcessor project(":inject-java")
annotationProcessor project(":graal")
api project(":inject")
api project(":inject")
compileOnly "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8"

testCompileOnly project(":inject-groovy")
Expand All @@ -25,4 +25,4 @@ spotless {
java {
targetExclude '**/io/micronaut/http/uri/QueryStringDecoder.java'
}
}
}
2 changes: 1 addition & 1 deletion inject-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies {
}
compileOnly dependencyVersion("validation")

testImplementation 'com.github.spotbugs:spotbugs-annotations:4.0.6'
testImplementation 'com.github.spotbugs:spotbugs-annotations:4.1.2'
testImplementation project(':aop')
testAnnotationProcessor project(":inject-java")
testImplementation project(":runtime")
Expand Down
2 changes: 1 addition & 1 deletion inject/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies {

testImplementation dependencyVersion("validation")
testImplementation project(":inject-groovy")
testImplementation "com.github.stefanbirkner:system-lambda:1.0.0"
testImplementation "com.github.stefanbirkner:system-lambda:1.1.0"

testImplementation dependencyModuleVersion("micronaut.test", "micronaut-test-junit5"), {
exclude module:'micronaut-runtime'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,20 +412,19 @@ class DefaultEnvironmentSpec extends Specification {
when:
System.setProperty("micronaut.config.files", "classpath:config-files.yml,classpath:config-files2.yml")
System.setProperty("config.prop", "system-property")
Environment env
SystemLambda.withEnvironmentVariable("CONFIG_PROP", "env-var")
.execute(() -> {
env = new DefaultEnvironment({["first", "second"]}).start()
})
Environment env = SystemLambda.withEnvironmentVariable("CONFIG_PROP", "env-var")
.execute(() -> {
new DefaultEnvironment({["first", "second"]}).start()
})

then: "System properties have highest precedence"
env.getRequiredProperty("config.prop", String.class) == "system-property"

when:
System.clearProperty("config.prop")
SystemLambda.withEnvironmentVariable("CONFIG_PROP", "env-var")
env = SystemLambda.withEnvironmentVariable("CONFIG_PROP", "env-var")
.execute(() -> {
env = new DefaultEnvironment({["first", "second"]}).start()
new DefaultEnvironment({["first", "second"]}).start()
})

then: "Environment variables have next highest precedence"
Expand Down Expand Up @@ -513,12 +512,9 @@ class DefaultEnvironmentSpec extends Specification {
}

void "test custom config locations - envrionment variables take precedence"() {
given:
ApplicationContext applicationContext

when:
SystemLambda.withEnvironmentVariable("CONFIG_PROP", "from-env").execute(() -> {
applicationContext = ApplicationContext.builder()
ApplicationContext applicationContext = SystemLambda.withEnvironmentVariable("CONFIG_PROP", "from-env").execute(() -> {
ApplicationContext.builder()
.overrideConfigLocations("file:./custom-config/", "classpath:custom-config/")
.environments("env1", "env2")
.build()
Expand All @@ -529,17 +525,15 @@ class DefaultEnvironmentSpec extends Specification {
applicationContext.getRequiredProperty("custom-config-classpath", String.class) == "xyz"
applicationContext.getRequiredProperty("custom-config-file", String.class) == "env2"
applicationContext.getRequiredProperty("config.prop", String.class) == "from-env"

cleanup:
applicationContext.stop()
}

void "test custom config locations - system properties take precedence over env"() {
given:
ApplicationContext applicationContext

when:
SystemLambda.withEnvironmentVariable("CONFIG_PROP", "from-env").execute(() -> {
applicationContext = ApplicationContext.builder()
ApplicationContext applicationContext = SystemLambda.withEnvironmentVariable("CONFIG_PROP", "from-env").execute(() -> {
ApplicationContext.builder()
.overrideConfigLocations("file:./custom-config/", "classpath:custom-config/")
.properties(["config.prop": "from-properties"])
.environments("env1", "env2")
Expand All @@ -551,6 +545,7 @@ class DefaultEnvironmentSpec extends Specification {
applicationContext.getRequiredProperty("custom-config-classpath", String.class) == "xyz"
applicationContext.getRequiredProperty("custom-config-file", String.class) == "env2"
applicationContext.getRequiredProperty("config.prop", String.class) == "from-properties"

cleanup:
applicationContext.stop()
}
Expand All @@ -563,27 +558,27 @@ class DefaultEnvironmentSpec extends Specification {
env.activeNames == ["test"] as Set

when:
SystemLambda.withEnvironmentVariable("MICRONAUT_ENVIRONMENTS", "first,second,third")
env = SystemLambda.withEnvironmentVariable("MICRONAUT_ENVIRONMENTS", "first,second,third")
.execute(() -> {
env = new DefaultEnvironment({[]}).start()
new DefaultEnvironment({[]}).start()
})

then: // env has priority over deduced
env.activeNames == ["test", "first", "second", "third"] as Set

when:
SystemLambda.withEnvironmentVariable("MICRONAUT_ENVIRONMENTS", "first,second,third")
env = SystemLambda.withEnvironmentVariable("MICRONAUT_ENVIRONMENTS", "first,second,third")
.execute(() -> {
env = new DefaultEnvironment({["specified"]}).start()
new DefaultEnvironment({["specified"]}).start()
})

then: // specified has priority over env
env.activeNames == ["test", "first", "second", "third", "specified"] as Set

when:
SystemLambda.withEnvironmentVariable("MICRONAUT_ENVIRONMENTS", "first,second,third")
env = SystemLambda.withEnvironmentVariable("MICRONAUT_ENVIRONMENTS", "first,second,third")
.execute(() -> {
env = new DefaultEnvironment({["second"]}).start()
new DefaultEnvironment({["second"]}).start()
})

then: // specified has priority over env, even if already set in env
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@ class EnvironmentPropertySourceSpec extends Specification {

void "test disabling environment properties"() {
def envs = SystemLambda.withEnvironmentVariable("A_B_C_D", "abcd")
ApplicationContext context
envs.execute(() ->
context = ApplicationContext.builder().start())
ApplicationContext context = envs.execute(() -> ApplicationContext.builder().start())

expect:
context.getRequiredProperty("a.b.c.d", String) == "abcd"

when:
context.stop()
envs.execute(() ->
context = ApplicationContext.builder().environmentPropertySource(false).start())
context = envs.execute(() -> ApplicationContext.builder()
.environmentPropertySource(false).start())

then:
!context.getProperty("a.b.c.d", String).isPresent()
Expand All @@ -34,8 +32,8 @@ class EnvironmentPropertySourceSpec extends Specification {
.and("A_B_C_G", "abcg")
.and("A_B_C_H", "abch")

ApplicationContext context
envs.execute(() -> context = ApplicationContext.builder().environmentVariableIncludes("A_B_C_G", "A_B_C_E").start())
ApplicationContext context = envs.execute(() -> ApplicationContext.builder()
.environmentVariableIncludes("A_B_C_G", "A_B_C_E").start())

expect:
!context.getProperty("a.b.c.d", String).isPresent()
Expand All @@ -46,7 +44,7 @@ class EnvironmentPropertySourceSpec extends Specification {

when:
context.stop()
envs.execute(() -> context = ApplicationContext.builder()
context = envs.execute(() -> ApplicationContext.builder()
.environmentVariableIncludes("A_B_C_D", "A_B_C_F", "A_B_C_H")
.environmentVariableExcludes("A_B_C_H").start())

Expand All @@ -59,8 +57,7 @@ class EnvironmentPropertySourceSpec extends Specification {

when:
context.stop()
envs.execute(() ->
context = ApplicationContext.builder()
context = envs.execute(() -> ApplicationContext.builder()
.environmentVariableExcludes("A_B_C_G", "A_B_C_H").start())

then:
Expand All @@ -75,8 +72,7 @@ class EnvironmentPropertySourceSpec extends Specification {
}

void "test a very large environment variable"() {
ApplicationContext context
SystemLambda.withEnvironmentVariable("A_B_C_D_E_F_G_H_I_J_K_L_M_N", "alphabet").execute(() -> context = ApplicationContext.builder().start())
ApplicationContext context = SystemLambda.withEnvironmentVariable("A_B_C_D_E_F_G_H_I_J_K_L_M_N", "alphabet").execute(() -> ApplicationContext.builder().start())

expect:
context.getProperty("a.b.c.d.e.f.g.h.i.j.k.l.m.n", String).isPresent()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ class PropertySourcePropertyResolverSpec extends Specification {
SystemLambda.withEnvironmentVariable("FOO_BAR", "foo bar")
.and("FOO_BAR_1", "foo bar 1")
.execute(() -> {
assert resolver.getProperty(key, Object).isPresent()
assert resolver.getProperty(key, type).get() == expected
assert resolver.containsProperty(key)
resolver.getProperty(key, Object).isPresent() &&
resolver.getProperty(key, type).get() == expected &&
resolver.containsProperty(key)
})

where:
Expand Down
2 changes: 1 addition & 1 deletion runtime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies {

compileOnly 'org.glassfish:javax.el:3.0.1-b11'
compileOnly "com.github.ben-manes.caffeine:caffeine:$caffeineVersion"
compileOnly 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8'
compileOnly 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9'
compileOnly 'org.jetbrains.kotlinx:kotlinx-coroutines-reactive:1.3.9'
compileOnly "ch.qos.logback:logback-classic:1.2.3"
testImplementation "ch.qos.logback:logback-classic:1.2.3"
Expand Down
4 changes: 2 additions & 2 deletions test-suite-groovy/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies {
testImplementation 'org.zalando:logbook-netty:2.1.0'
testImplementation project(":function-client")
testImplementation project(":function-web")
testRuntimeOnly group: 'com.amazonaws', name: 'aws-java-sdk-lambda', version: '1.11.852'
testRuntimeOnly group: 'com.amazonaws', name: 'aws-java-sdk-lambda', version: '1.11.858'

}

Expand All @@ -32,4 +32,4 @@ dependencies {
// showStandardStreams = true
// exceptionFormat = 'full'
// }
//}
//}
2 changes: 1 addition & 1 deletion test-suite-kotlin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ dependencies {
kaptTest project(':inject-java')
kaptTest project(':validation')
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit5Version"
testRuntimeOnly group: 'com.amazonaws', name: 'aws-java-sdk-lambda', version: '1.11.852'
testRuntimeOnly group: 'com.amazonaws', name: 'aws-java-sdk-lambda', version: '1.11.858'
}

compileTestKotlin {
Expand Down
8 changes: 4 additions & 4 deletions test-suite/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ dependencies {
testRuntimeOnly dependencyVersion("h2")
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:$junit5Version"
testRuntimeOnly "ch.qos.logback:logback-classic:1.2.3"
testRuntimeOnly group: 'com.amazonaws', name: 'aws-java-sdk-lambda', version: '1.11.852'
testRuntimeOnly group: 'com.amazonaws', name: 'aws-java-sdk-lambda', version: '1.11.858'

// needed for HTTP/2 tests
testImplementation 'io.netty:netty-tcnative:2.0.31.Final'
testImplementation 'io.netty:netty-tcnative-boringssl-static:2.0.31.Final'
testImplementation "io.netty:netty-tcnative-boringssl-static:2.0.31.Final:${Os.isFamily(Os.FAMILY_MAC) ? 'osx-x86_64' : 'linux-x86_64'}"
testImplementation 'io.netty:netty-tcnative:2.0.34.Final'
testImplementation 'io.netty:netty-tcnative-boringssl-static:2.0.34.Final'
testImplementation "io.netty:netty-tcnative-boringssl-static:2.0.34.Final:${Os.isFamily(Os.FAMILY_MAC) ? 'osx-x86_64' : 'linux-x86_64'}"
testImplementation 'org.zalando:logbook-netty:2.1.0'
testImplementation "ch.qos.logback:logback-classic:1.2.3"
}
Expand Down

0 comments on commit c928858

Please sign in to comment.