Skip to content

Commit a88d1ed

Browse files
Update dependencies (#459)
* Update dependencies Plugins: - com.diffplug.spotless 6.25.0 -> 7.2.1 - io.spring.dependency-management 1.1.6 -> 1.1.7 - me.champeau.jmh 0.7.2 -> 0.7.3 - com.google.protobuf (gradle) 0.9.4 -> 0.9.5 - Gradle wrapper 8.10.2 -> 8.14.3 Libraries: - log4j 2.24.1 -> 2.25.4 - junit-jupiter 5.11.3 -> 5.13.4 - junit-platform 1.13.4 (new explicit dependency) - assertj-core 3.26.3 -> 3.27.4 - protobuf-java 3.25.5 -> 4.32.1 - netty 4.2.5.Final -> 4.2.12.Final - netty-tcnative-boringssl-static 2.0.73.Final -> 2.0.76.Final - bouncycastle 1.78.1 -> 1.80 - guava 33.3.1-jre -> 33.4.8-jre - slf4j-api 2.0.9 -> 2.0.17 - ktlint version pinned to 1.1.1 Other: - Remove jmh from explicit dependencies (managed by me.champeau.jmh plugin) - Use ParameterizedInvocationConstants.INDEX_PLACEHOLDER (junit 5.13+) - Remove dead commented-out debug code in GossipScoreBenchmark * Fix detekt failing on JVM 21 detekt 1.22.0 only accepts jvmTarget up to 18, so it fails when Gradle runs on Java 21. Explicitly setting jvmTarget = "11" on the Detekt tasks matches the project's configured Kotlin target and unblocks the check. detekt 1.23.x would fix this properly but requires Kotlin 1.9+, which is a separate upgrade. * Revert slf4j and bouncycastle upgrades for Android compatibility AGP 7.4.2's D8 dexer cannot process the newer bytecode format used by slf4j-api 2.0.17 and bouncycastle 1.80, causing the android-chatter example module to fail to build. Reverting to versions compatible with the old D8 toolchain. Unblocked once AGP is upgraded (tracked in #458 as part of Kotlin 2.x work). * Revert guava upgrade for Android compatibility guava 33.4.8-jre transitively brings in error_prone_annotations 2.36.0, which AGP 7.4.2's D8 dexer cannot process. Reverting to 33.3.1-jre which pulls in 2.28.0, the previously working version. Unblocked once AGP is upgraded (tracked in #458). * Revert protobuf upgrade for Android compatibility protobuf-java 4.32.1 generates bytecode that AGP 7.4.2's D8 dexer cannot process (IdentifyOuterClass and similar generated classes fail to dex). Reverting to 3.25.5 (the current develop version) restores Android compatibility. protobuf 4.x can be revisited once AGP is upgraded (tracked in #458). * Change Netty version in versions.gradle Updated Netty version from 4.2.12.Final to 4.2.10.Final.
1 parent 9445f0d commit a88d1ed

9 files changed

Lines changed: 63 additions & 55 deletions

File tree

build.gradle.kts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ plugins {
1818
id("java")
1919
id("maven-publish")
2020
id("org.jetbrains.dokka").version("1.9.20")
21-
id("com.diffplug.spotless").version("6.25.0")
21+
id("com.diffplug.spotless").version("7.2.1")
2222
id("java-test-fixtures")
23-
id("io.spring.dependency-management").version("1.1.6")
23+
id("io.spring.dependency-management").version("1.1.7")
2424

2525
id("org.jetbrains.kotlin.android") version kotlinVersion apply false
2626
id("com.android.application") version "7.4.2" apply false
@@ -63,6 +63,8 @@ configure(
6363

6464
testImplementation("org.junit.jupiter:junit-jupiter")
6565
testImplementation("org.junit.jupiter:junit-jupiter-params")
66+
testImplementation("org.junit.platform:junit-platform-launcher")
67+
testRuntimeOnly("org.junit.platform:junit-platform-engine")
6668
testImplementation("io.mockk:mockk")
6769
testImplementation("org.assertj:assertj-core")
6870
testRuntimeOnly("org.apache.logging.log4j:log4j-slf4j2-impl")
@@ -84,6 +86,9 @@ configure(
8486
tasks.withType<Copy> {
8587
duplicatesStrategy = DuplicatesStrategy.INCLUDE
8688
}
89+
tasks.withType<io.gitlab.arturbosch.detekt.Detekt>().configureEach {
90+
jvmTarget = "11"
91+
}
8792

8893
// Parallel build execution
8994
tasks.test {
@@ -108,8 +113,10 @@ configure(
108113
}
109114

110115
configure<SpotlessExtension> {
116+
// https://github.com/pinterest/ktlint/releases
117+
val ktlintVersion = "1.1.1"
111118
kotlin {
112-
ktlint().editorConfigOverride(
119+
ktlint(ktlintVersion).editorConfigOverride(
113120
mapOf(
114121
"ktlint_standard_no-wildcard-imports" to "disabled",
115122
"ktlint_standard_enum-entry-name-case" to "disabled",
@@ -140,7 +147,7 @@ configure(
140147
jdkVersion.set(11)
141148
reportUndocumented.set(false)
142149
externalDocumentationLink {
143-
url.set(URI.create("https://netty.io/4.1/api/").toURL())
150+
url.set(URI.create("https://netty.io/4.2/api/").toURL())
144151
}
145152
}
146153
}

gradle/wrapper/gradle-wrapper.jar

-17.4 KB
Binary file not shown.
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
3+
distributionSha256Sum=bd71102213493060956ec229d946beee57158dbd89d0e62b91bca0fa2c5f3531
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
55
networkTimeout=10000
6+
validateDistributionUrl=true
67
zipStoreBase=GRADLE_USER_HOME
78
zipStorePath=wrapper/dists

gradlew

Lines changed: 22 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 14 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libp2p/build.gradle.kts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id("com.google.protobuf").version("0.9.4")
3-
id("me.champeau.jmh").version("0.7.2")
3+
id("me.champeau.jmh").version("0.7.3")
44
}
55

66
// https://docs.gradle.org/current/userguide/java_testing.html#ex-disable-publishing-of-test-fixtures-variants
@@ -46,8 +46,6 @@ dependencies {
4646
testFixturesImplementation("org.junit.jupiter:junit-jupiter-api")
4747

4848
jmhImplementation(project(":tools:schedulers"))
49-
jmhImplementation("org.openjdk.jmh:jmh-core")
50-
jmhAnnotationProcessor("org.openjdk.jmh:jmh-generator-annprocess")
5149
}
5250

5351
protobuf {

libp2p/src/jmh/java/io/libp2p/pubsub/gossip/GossipScoreBenchmark.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,4 @@ public void scoresDelay10000(Blackhole bh) {
107107
bh.consume(s);
108108
}
109109
}
110-
111-
/** Uncomment for debugging */
112-
// public static void main(String[] args) {
113-
// GossipScoreBenchmark benchmark = new GossipScoreBenchmark();
114-
// Blackhole blackhole = new Blackhole("Today's password is swordfish. I understand
115-
// instantiating Blackholes directly is dangerous.");
116-
// benchmark.scoresDelay0(blackhole);
117-
// }
118110
}

libp2p/src/test/kotlin/io/libp2p/pubsub/gossip/GossipRpcPartsQueueTest.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import io.libp2p.pubsub.gossip.builders.GossipParamsBuilder
88
import io.libp2p.pubsub.gossip.builders.GossipRouterBuilder
99
import org.assertj.core.api.Assertions.assertThat
1010
import org.junit.jupiter.api.Test
11+
import org.junit.jupiter.params.ParameterizedInvocationConstants
1112
import org.junit.jupiter.params.ParameterizedTest
1213
import org.junit.jupiter.params.provider.Arguments
1314
import org.junit.jupiter.params.provider.MethodSource
@@ -186,7 +187,7 @@ class GossipRpcPartsQueueTest {
186187
fun mergeParams(): Stream<Arguments> = testCases.stream()
187188
}
188189

189-
@ParameterizedTest(name = "[${ParameterizedTest.INDEX_PLACEHOLDER}] {0}")
190+
@ParameterizedTest(name = "[${ParameterizedInvocationConstants.INDEX_PLACEHOLDER}] {0}")
190191
@MethodSource("mergeParams")
191192
fun `mergeMessageParts() test various combinations`(
192193
gossipParams: GossipParams,

versions.gradle

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,29 @@ dependencyManagement {
99
dependency "com.google.guava:guava:33.3.1-jre"
1010

1111
dependency "org.slf4j:slf4j-api:2.0.9"
12-
dependencySet(group: 'org.apache.logging.log4j', version: '2.24.1') {
12+
dependencySet(group: 'org.apache.logging.log4j', version: '2.25.4') {
1313
entry 'log4j-core'
1414
entry 'log4j-slf4j2-impl'
1515
}
1616

17-
dependencySet(group: 'org.junit.jupiter', version: '5.11.3') {
17+
dependencySet(group: 'org.junit.jupiter', version: '5.13.4') {
1818
entry 'junit-jupiter-api'
1919
entry 'junit-jupiter-engine'
2020
entry 'junit-jupiter-params'
2121
}
22-
dependency "io.mockk:mockk:1.13.3"
23-
dependency "org.assertj:assertj-core:3.26.3"
22+
dependencySet(group: 'org.junit.platform', version: '1.13.4') {
23+
entry 'junit-platform-launcher'
24+
entry 'junit-platform-engine'
2425

25-
dependencySet(group: "org.openjdk.jmh", version: "1.37") {
26-
entry 'jmh-core'
27-
entry 'jmh-generator-annprocess'
2826
}
27+
dependency "io.mockk:mockk:1.13.3"
28+
dependency "org.assertj:assertj-core:3.27.4"
2929

3030
dependencySet(group: "com.google.protobuf", version: "3.25.5") {
3131
entry 'protobuf-java'
3232
entry 'protoc'
3333
}
34-
dependencySet(group: "io.netty", version: "4.2.5.Final") {
34+
dependencySet(group: "io.netty", version: "4.2.10.Final") {
3535
entry 'netty-common'
3636
entry 'netty-handler'
3737
entry 'netty-transport'
@@ -41,7 +41,7 @@ dependencyManagement {
4141
entry 'netty-codec-native-quic'
4242
entry 'netty-transport-classes-epoll'
4343
}
44-
dependency "io.netty:netty-tcnative-boringssl-static:2.0.73.Final"
44+
dependency "io.netty:netty-tcnative-boringssl-static:2.0.76.Final"
4545
dependency "com.github.multiformats:java-multibase:v1.1.1"
4646
dependency "tech.pegasys:noise-java:22.1.0"
4747
dependencySet(group: "org.bouncycastle", version: "1.78.1") {
@@ -50,4 +50,4 @@ dependencyManagement {
5050
entry 'bctls-jdk18on'
5151
}
5252
}
53-
}
53+
}

0 commit comments

Comments
 (0)