Skip to content

Commit 72ae935

Browse files
committed
Versions update
1 parent eae0540 commit 72ae935

File tree

8 files changed

+77
-52
lines changed

8 files changed

+77
-52
lines changed

build-logic/src/main/kotlin/libp2p.common.gradle.kts

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import kotlinx.kover.gradle.plugin.dsl.GroupingEntityType
55
import kotlinx.kover.gradle.plugin.dsl.MetricType
66
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
77
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
8-
import org.jlleitschuh.gradle.ktlint.reporter.ReporterType
98

109
@Suppress("DSL_SCOPE_VIOLATION")
1110
plugins {
@@ -14,25 +13,25 @@ plugins {
1413
kotlin("plugin.serialization")
1514

1615
org.jetbrains.kotlinx.kover
17-
org.jlleitschuh.gradle.ktlint
16+
// org.jlleitschuh.gradle.ktlint
1817
com.adarshr.`test-logger`
1918
}
2019

2120
group = "org.erwinkok.libp2p"
2221
version = "0.2.0"
2322

24-
ktlint {
25-
verbose.set(true)
26-
outputToConsole.set(true)
27-
coloredOutput.set(true)
28-
reporters {
29-
reporter(ReporterType.CHECKSTYLE)
30-
reporter(ReporterType.HTML)
31-
}
32-
filter {
33-
exclude("**/style-violations.kt")
34-
}
35-
}
23+
//ktlint {
24+
// verbose.set(true)
25+
// outputToConsole.set(true)
26+
// coloredOutput.set(true)
27+
// reporters {
28+
// reporter(ReporterType.CHECKSTYLE)
29+
// reporter(ReporterType.HTML)
30+
// }
31+
// filter {
32+
// exclude("**/build/**")
33+
// }
34+
//}
3635

3736
tasks.test {
3837
useJUnitPlatform()
@@ -43,7 +42,6 @@ testlogger {
4342
}
4443

4544
kover {
46-
useKoverTool()
4745
excludeInstrumentation {
4846
classes("org.erwinkok.libp2p.*.pb.*")
4947
}
@@ -59,12 +57,13 @@ koverReport {
5957
}
6058
}
6159

62-
html {
63-
onCheck = true
60+
defaults {
61+
html {
62+
onCheck = true
63+
}
6464
}
6565

6666
verify {
67-
onCheck = true
6867
rule {
6968
isEnabled = true
7069
entity = GroupingEntityType.APPLICATION

build-logic/src/main/kotlin/libp2p.protoc.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ sourceSets {
1414

1515
protobuf {
1616
protoc {
17-
artifact = "com.google.protobuf:protoc:3.22.0"
17+
artifact = "com.google.protobuf:protoc:3.25.2"
1818
}
1919
}

build.gradle.kts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
// Copyright (c) 2023 Erwin Kok. BSD-3-Clause license. See LICENSE file for more details.
1+
// Copyright (c) 2024 Erwin Kok. BSD-3-Clause license. See LICENSE file for more details.
2+
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
3+
24
plugins {
35
alias(libs.plugins.build.versions)
46
alias(libs.plugins.build.nexus)
@@ -13,3 +15,16 @@ nexusPublishing {
1315
}
1416
}
1517
}
18+
19+
fun isNonStable(version: String): Boolean {
20+
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.uppercase().contains(it) }
21+
val regex = "^[0-9,.v-]+(-r)?$".toRegex()
22+
val isStable = stableKeyword || regex.matches(version)
23+
return isStable.not()
24+
}
25+
26+
tasks.withType<DependencyUpdatesTask> {
27+
rejectVersionIf {
28+
isNonStable(candidate.version)
29+
}
30+
}

gradle.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#
2+
# Copyright (c) 2024 Erwin Kok. BSD-3-Clause license. See LICENSE file for more details.
3+
#
4+
5+
org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8

gradle/libs.versions.toml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
[versions]
22
kotlinx-coroutines = "1.7.3"
3-
kotlinx-atomicfu = "0.22.0"
4-
kotlinx-serialization = "1.5.1"
5-
kotlin = "1.9.0"
3+
kotlinx-atomicfu = "0.23.2"
4+
kotlinx-serialization = "1.6.2"
5+
kotlin = "1.9.22"
66

7-
detekt-plugin = "1.23.0"
8-
kover-plugin = "0.7.0-Alpha"
9-
ktlint-plugin = "10.3.0"
10-
protobuf-plugin = "0.9.2"
7+
detekt-plugin = "1.23.4"
8+
kover-plugin = "0.7.5"
9+
ktlint-plugin = "12.1.0"
10+
protobuf-plugin = "0.9.4"
1111
testlogger-plugin = "3.2.0"
1212

1313
caffeine = "3.1.8"
1414
ipaddress = "5.4.0"
15-
jedis = "4.4.3"
16-
junit-jupiter = "5.10.0"
15+
jedis = "5.1.0"
16+
junit-jupiter = "5.10.1"
1717
kerby-asn1 = "2.0.3"
1818
klaxon = "5.6"
1919
kotlin-logging = "3.0.5"
20-
ktor = "2.3.2"
21-
logback-classic = "1.4.11"
22-
mockk = "1.13.7"
20+
ktor = "2.2.4"
21+
logback-classic = "1.4.14"
22+
mockk = "1.13.9"
2323
multiformat = "1.1.0"
2424
noise-java = "1.0.0"
25-
protobuf = "3.22.0"
25+
protobuf = "3.25.2"
2626
reflections = "0.10.2"
2727
result-monad = "1.4.0"
28-
rocksdb = "8.3.2"
28+
rocksdb = "8.10.0"
2929
shadow = "8.1.1"
30-
slf4j-api = "2.0.7"
30+
slf4j-api = "2.0.11"
3131

32-
nexus-plugin = "1.2.0"
33-
versions-plugin = "0.47.0"
32+
nexus-plugin = "1.3.0"
33+
versions-plugin = "0.51.0"
3434

3535
[libraries]
3636
# Libraries for the build system
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
44
networkTimeout=10000
5+
validateDistributionUrl=true
56
zipStoreBase=GRADLE_USER_HOME
67
zipStorePath=wrapper/dists

gradlew

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,8 @@ done
8383
# This is normally unused
8484
# shellcheck disable=SC2034
8585
APP_BASE_NAME=${0##*/}
86-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
87-
88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
86+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87+
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
9088

9189
# Use the maximum available, or set MAX_FD != -1 to use that value.
9290
MAX_FD=maximum
@@ -133,26 +131,29 @@ location of your Java installation."
133131
fi
134132
else
135133
JAVACMD=java
136-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
134+
if ! command -v java >/dev/null 2>&1
135+
then
136+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137137
138138
Please set the JAVA_HOME variable in your environment to match the
139139
location of your Java installation."
140+
fi
140141
fi
141142

142143
# Increase the maximum file descriptors if we can.
143144
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144145
case $MAX_FD in #(
145146
max*)
146147
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147-
# shellcheck disable=SC3045
148+
# shellcheck disable=SC2039,SC3045
148149
MAX_FD=$( ulimit -H -n ) ||
149150
warn "Could not query maximum file descriptor limit"
150151
esac
151152
case $MAX_FD in #(
152153
'' | soft) :;; #(
153154
*)
154155
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155-
# shellcheck disable=SC3045
156+
# shellcheck disable=SC2039,SC3045
156157
ulimit -n "$MAX_FD" ||
157158
warn "Could not set maximum file descriptor limit to $MAX_FD"
158159
esac
@@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then
197198
done
198199
fi
199200

200-
# Collect all arguments for the java command;
201-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
202-
# shell script including quotes and variable substitutions, so put them in
203-
# double quotes to make sure that they get re-expanded; and
204-
# * put everything else in single quotes, so that it's not re-expanded.
201+
202+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204+
205+
# Collect all arguments for the java command:
206+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207+
# and any embedded shellness will be escaped.
208+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209+
# treated as '${Hostname}' itself on the command line.
205210

206211
set -- \
207212
"-Dorg.gradle.appname=$APP_BASE_NAME" \

libp2p-testing/src/main/kotlin/org/erwinkok/libp2p/testing/TestConnection.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ class TestConnection(chunkBufferPool: VerifyingChunkBufferPool) {
2121

2222
inner class Inner(
2323
private val chunkBufferPool: VerifyingChunkBufferPool,
24-
private val _input: ByteChannel,
25-
private val _output: ByteChannel,
24+
private val _input: ByteReadChannel,
25+
private val _output: ByteWriteChannel,
2626
) : Connection {
2727
override val pool: ObjectPool<ChunkBuffer>
2828
get() = chunkBufferPool

0 commit comments

Comments
 (0)