Skip to content

Commit

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

* Add maven to plugin repos

* Fix tests that fail with groovy 4.0.2 (#42)

Co-authored-by: Lauri Tulmin <[email protected]>
  • Loading branch information
anuraaga and laurit authored May 17, 2022
1 parent 1298b46 commit 528360d
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 29 deletions.
2 changes: 1 addition & 1 deletion conventions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ dependencies {
implementation("org.gradle:test-retry-gradle-plugin:1.3.1")
implementation("ru.vyarus:gradle-animalsniffer-plugin:1.5.4")
// When updating, also update dependencyManagement/build.gradle.kts
implementation("net.bytebuddy:byte-buddy-gradle-plugin:1.12.9")
implementation("net.bytebuddy:byte-buddy-gradle-plugin:1.12.10")
implementation("gradle.plugin.io.morethan.jmhreport:gradle-jmh-report:0.9.0")
implementation("me.champeau.jmh:jmh-gradle-plugin:0.6.6")
implementation("net.ltgt.gradle:gradle-errorprone-plugin:2.0.2")
Expand Down
20 changes: 8 additions & 12 deletions dependencyManagement/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ val otelVersion = "1.14.0"
rootProject.extra["otelVersion"] = otelVersion

// Need both BOM and groovy jars
val groovyVersion = "4.0.1"
val groovyVersion = "4.0.2"

// We don't force libraries we instrument to new versions since we compile and test against specific
// old baseline versions
Expand All @@ -35,7 +35,8 @@ val DEPENDENCY_BOMS = listOf(
"org.apache.groovy:groovy-bom:${groovyVersion}",
"io.opentelemetry:opentelemetry-bom:${otelVersion}",
"io.opentelemetry:opentelemetry-bom-alpha:${otelVersion}-alpha",
"org.junit:junit-bom:5.8.2"
"org.junit:junit-bom:5.8.2",
"org.testcontainers:testcontainers-bom:1.17.1",
)

val DEPENDENCY_SETS = listOf(
Expand All @@ -57,7 +58,7 @@ val DEPENDENCY_SETS = listOf(
DependencySet(
"net.bytebuddy",
// When updating, also update conventions/build.gradle.kts
"1.12.9",
"1.12.10",
listOf("byte-buddy", "byte-buddy-dep", "byte-buddy-agent", "byte-buddy-gradle-plugin")
),
DependencySet(
Expand All @@ -67,27 +68,22 @@ val DEPENDENCY_SETS = listOf(
),
DependencySet(
"org.mockito",
"4.4.0",
"4.5.1",
listOf("mockito-core", "mockito-junit-jupiter", "mockito-inline")
),
DependencySet(
"org.slf4j",
"1.7.36",
listOf("slf4j-api", "slf4j-simple", "log4j-over-slf4j", "jcl-over-slf4j", "jul-to-slf4j")
),
DependencySet(
"org.testcontainers",
"1.16.3",
listOf("testcontainers", "junit-jupiter", "cassandra", "couchbase", "elasticsearch", "kafka", "localstack", "selenium")
)
)

val DEPENDENCIES = listOf(
"ch.qos.logback:logback-classic:1.2.11",
"com.github.stefanbirkner:system-lambda:1.2.1",
"com.github.stefanbirkner:system-rules:1.19.0",
"uk.org.webcompere:system-stubs-jupiter:2.0.1",
"com.uber.nullaway:nullaway:0.9.6",
"com.uber.nullaway:nullaway:0.9.7",
"commons-beanutils:commons-beanutils:1.9.4",
"commons-cli:commons-cli:1.5.0",
"commons-codec:commons-codec:1.15",
Expand All @@ -99,14 +95,14 @@ val DEPENDENCIES = listOf(
"commons-logging:commons-logging:1.2",
"commons-validator:commons-validator:1.7",
"io.netty:netty:3.10.6.Final",
"io.opentelemetry.proto:opentelemetry-proto:0.16.0-alpha",
"io.opentelemetry.proto:opentelemetry-proto:0.17.0-alpha",
"org.assertj:assertj-core:3.22.0",
"org.awaitility:awaitility:4.2.0",
"com.google.code.findbugs:annotations:3.0.1u2",
"com.google.code.findbugs:jsr305:3.0.2",
"org.apache.groovy:groovy:${groovyVersion}",
"org.apache.groovy:groovy-json:${groovyVersion}",
"org.junit-pioneer:junit-pioneer:1.6.2",
"org.junit-pioneer:junit-pioneer:1.7.0",
"org.objenesis:objenesis:3.2",
"org.spockframework:spock-core:2.2-M1-groovy-4.0",
"org.spockframework:spock-junit4:2.2-M1-groovy-4.0",
Expand Down
4 changes: 2 additions & 2 deletions gradle-plugins/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ configurations.named("compileOnly") {
dependencies {
implementation("com.google.guava:guava:31.1-jre")
// we need to use byte buddy variant that does not shade asm
implementation("net.bytebuddy:byte-buddy-gradle-plugin:1.12.9") {
implementation("net.bytebuddy:byte-buddy-gradle-plugin:1.12.10") {
exclude(group = "net.bytebuddy", module = "byte-buddy")
}
implementation("net.bytebuddy:byte-buddy-dep:1.12.9")
implementation("net.bytebuddy:byte-buddy-dep:1.12.10")

implementation("org.eclipse.aether:aether-connector-basic:1.1.0")
implementation("org.eclipse.aether:aether-transport-http:1.1.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ class Netty40ServerTest extends HttpServerTest<EventLoopGroup> implements AgentT

def handlers = [new HttpRequestDecoder(), new HttpResponseEncoder()]
handlers.each { pipeline.addLast(it) }
pipeline.addLast([
channelRead0 : { ctx, msg ->
pipeline.addLast(new SimpleChannelInboundHandler() {

@Override
protected void channelRead0(ChannelHandlerContext ctx, Object msg) throws Exception {
if (msg instanceof HttpRequest) {
def request = msg as HttpRequest
def uri = URI.create(request.uri)
Expand Down Expand Up @@ -109,16 +111,22 @@ class Netty40ServerTest extends HttpServerTest<EventLoopGroup> implements AgentT
return response
}
}
},
exceptionCaught : { ChannelHandlerContext ctx, Throwable cause ->
}

@Override
void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
ByteBuf content = Unpooled.copiedBuffer(cause.message, CharsetUtil.UTF_8)
FullHttpResponse response = new DefaultFullHttpResponse(HTTP_1_1, INTERNAL_SERVER_ERROR, content)
response.headers().set(CONTENT_TYPE, "text/plain")
response.headers().set(CONTENT_LENGTH, content.readableBytes())
ctx.write(response)
},
channelReadComplete: { it.flush() }
] as SimpleChannelInboundHandler)
}

@Override
void channelReadComplete(ChannelHandlerContext ctx) throws Exception {
ctx.flush()
}
})
}
] as ChannelInitializer).channel(NioServerSocketChannel)
bootstrap.bind(port).sync()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ class Netty41ServerTest extends HttpServerTest<EventLoopGroup> implements AgentT

def handlers = [new HttpServerCodec()]
handlers.each { pipeline.addLast(it) }
pipeline.addLast([
channelRead0 : { ctx, msg ->
pipeline.addLast(new SimpleChannelInboundHandler() {

@Override
protected void channelRead0(ChannelHandlerContext ctx, Object msg) throws Exception {
if (msg instanceof HttpRequest) {
def request = msg as HttpRequest
def uri = URI.create(request.uri())
Expand Down Expand Up @@ -108,16 +110,22 @@ class Netty41ServerTest extends HttpServerTest<EventLoopGroup> implements AgentT
return response
}
}
},
exceptionCaught : { ChannelHandlerContext ctx, Throwable cause ->
}

@Override
void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
ByteBuf content = Unpooled.copiedBuffer(cause.message, CharsetUtil.UTF_8)
FullHttpResponse response = new DefaultFullHttpResponse(HTTP_1_1, INTERNAL_SERVER_ERROR, content)
response.headers().set(CONTENT_TYPE, "text/plain")
response.headers().set(CONTENT_LENGTH, content.readableBytes())
ctx.write(response)
},
channelReadComplete: { it.flush() }
] as SimpleChannelInboundHandler)
}

@Override
void channelReadComplete(ChannelHandlerContext ctx) throws Exception {
ctx.flush()
}
})
}
] as ChannelInitializer).channel(NioServerSocketChannel)
bootstrap.bind(port).sync()
Expand Down
5 changes: 5 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ pluginManagement {
id("org.unbroken-dome.test-sets") version "4.0.0"
id("org.xbib.gradle.plugin.jflex") version "1.6.0"
}

repositories {
gradlePluginPortal()
mavenCentral()
}
}

plugins {
Expand Down

0 comments on commit 528360d

Please sign in to comment.