Skip to content

Commit affdb17

Browse files
committed
Versions update
1 parent 534a104 commit affdb17

File tree

90 files changed

+497
-479
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+497
-479
lines changed

.editorconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[*.{kt,kts}]
2+
end_of_line = lf
3+
ij_kotlin_allow_trailing_comma = true
4+
ij_kotlin_imports_layout = *, java.**, javax.**, kotlin.**, ^
5+
ij_kotlin_indent_before_arrow_on_new_line = false
6+
ij_kotlin_line_break_after_multiline_when_entry = true
7+
ij_kotlin_allow_trailing_comma_on_call_site = true
8+
indent_size = 4
9+
indent_style = space
10+
insert_final_newline = true
11+
ktlint_argument_list_wrapping_ignore_when_parameter_count_greater_or_equal_than = 8
12+
ktlint_chain_method_rule_force_multiline_when_chain_operator_count_greater_or_equal_than = 4
13+
ktlint_class_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than = unset
14+
ktlint_code_style = intellij_idea
15+
ktlint_enum_entry_name_casing = upper_or_camel_cases
16+
ktlint_function_signature_body_expression_wrapping = default
17+
ktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than = unset
18+
ktlint_ignore_back_ticked_identifier = false
19+
ktlint_property_naming_constant_naming = screaming_snake_case
20+
max_line_length = off
21+
ktlint_standard_property-naming = disabled
22+
ktlint_standard_discouraged-comment-location = disabled

README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,12 @@
66

77
[![ci](https://github.com/erwin-kok/kotlin-libp2p/actions/workflows/ci.yaml/badge.svg)](https://github.com/erwin-kok/kotlin-libp2p/actions/workflows/ci.yaml)
88
[![Maven Central](https://img.shields.io/maven-central/v/org.erwinkok.libp2p/libp2p-core)](https://central.sonatype.com/artifact/org.erwinkok.libp2p/libp2p-core)
9-
[![Kotlin](https://img.shields.io/badge/kotlin-1.9.0-blue.svg?logo=kotlin)](http://kotlinlang.org)
9+
[![Kotlin](https://img.shields.io/badge/kotlin-2.2.0-blue.svg?logo=kotlin)](http://kotlinlang.org)
1010
[![License](https://img.shields.io/github/license/erwin-kok/kotlin-libp2p.svg)](https://github.com/erwin-kok/kotlin-libp2p/blob/master/LICENSE)
1111

12-
## Disclaimer
13-
14-
Welcome to my personal pet project! This project is currently under heavy development (WIP), and as such I do not
15-
guarantee functionality, stable interfaces and/or operation without any bugs/issues (See also [`LICENSE`](LICENSE) for
16-
more details). The current main goal of this project is educational, and to research new technologies.
17-
1812
## libp2p overview
1913

20-
Traditional communication is client-server based. The client initiates a connection to the server, and communicates with
14+
Traditional communication is client-server-based. The client initiates a connection to the server, and communicates with
2115
the server using a protocol suited for that server. As an example: suppose we have two WhatsApp clients lets say `A`
2216
and `B`. And `A` wants to send a message to `B`. Typically, they both initiate a connection to the server. `A` sends a
2317
message to the server and tells the server to relay this message to `B`. The server knows both clients so this

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

Lines changed: 13 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,19 @@
11
// Copyright (c) 2023 Erwin Kok. BSD-3-Clause license. See LICENSE file for more details.
22
import com.adarshr.gradle.testlogger.theme.ThemeType
3-
import kotlinx.kover.gradle.plugin.dsl.AggregationType
4-
import kotlinx.kover.gradle.plugin.dsl.GroupingEntityType
5-
import kotlinx.kover.gradle.plugin.dsl.MetricType
63

7-
@Suppress("DSL_SCOPE_VIOLATION")
84
plugins {
95
idea
106
kotlin("jvm")
117
kotlin("plugin.serialization")
128

13-
org.jetbrains.kotlinx.kover
14-
// org.jlleitschuh.gradle.ktlint
15-
com.adarshr.`test-logger`
9+
id("org.jetbrains.kotlinx.kover")
10+
id("org.jlleitschuh.gradle.ktlint")
11+
id("com.adarshr.test-logger")
1612
}
1713

1814
group = "org.erwinkok.libp2p"
1915
version = "0.2.0"
2016

21-
//ktlint {
22-
// verbose.set(true)
23-
// outputToConsole.set(true)
24-
// coloredOutput.set(true)
25-
// reporters {
26-
// reporter(ReporterType.CHECKSTYLE)
27-
// reporter(ReporterType.HTML)
28-
// }
29-
// filter {
30-
// exclude("**/build/**")
31-
// }
32-
//}
33-
3417
tasks.test {
3518
useJUnitPlatform()
3619
}
@@ -40,36 +23,18 @@ testlogger {
4023
}
4124

4225
kover {
43-
excludeInstrumentation {
44-
classes("org.erwinkok.libp2p.*.pb.*")
45-
}
46-
}
47-
48-
koverReport {
49-
filters {
50-
excludes {
51-
classes("org.erwinkok.libp2p.*.pb.*")
52-
}
53-
includes {
54-
classes("org.erwinkok.libp2p.*")
55-
}
56-
}
57-
58-
defaults {
59-
html {
60-
onCheck = true
26+
reports {
27+
filters {
28+
excludes {
29+
classes("org.erwinkok.libp2p.*.pb.*")
30+
}
6131
}
62-
}
6332

64-
verify {
65-
rule {
66-
isEnabled = true
67-
entity = GroupingEntityType.APPLICATION
68-
bound {
69-
minValue = 0
70-
maxValue = 99
71-
metric = MetricType.LINE
72-
aggregation = AggregationType.COVERED_PERCENTAGE
33+
verify {
34+
rule {
35+
bound {
36+
minValue.set(0)
37+
}
7338
}
7439
}
7540
}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// Copyright (c) 2023 Erwin Kok. BSD-3-Clause license. See LICENSE file for more details.
2-
@Suppress("DSL_SCOPE_VIOLATION")
32
plugins {
43
io.gitlab.arturbosch.detekt
54
}

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.25.2"
17+
artifact = "com.google.protobuf:protoc:4.31.1"
1818
}
1919
}

examples/build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,7 @@ dependencies {
2929
implementation(libs.slf4j.api)
3030

3131
runtimeOnly(libs.logback.classic)
32+
33+
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
34+
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
3235
}

examples/src/main/kotlin/org/erwinkok/libp2p/examples/chat/Application.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// Copyright (c) 2023 Erwin Kok. BSD-3-Clause license. See LICENSE file for more details.
22
package org.erwinkok.libp2p.examples.chat
33

4+
import io.github.oshai.kotlinlogging.KotlinLogging
45
import io.ktor.utils.io.writeFully
56
import kotlinx.coroutines.CoroutineExceptionHandler
67
import kotlinx.coroutines.CoroutineScope
78
import kotlinx.coroutines.Dispatchers
89
import kotlinx.coroutines.SupervisorJob
910
import kotlinx.coroutines.launch
1011
import kotlinx.coroutines.runBlocking
11-
import mu.KotlinLogging
1212
import org.erwinkok.libp2p.core.host.BasicHost
1313
import org.erwinkok.libp2p.core.host.Host
1414
import org.erwinkok.libp2p.core.host.LocalIdentity

gradle/libs.versions.toml

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

7-
detekt-plugin = "1.23.4"
8-
kover-plugin = "0.7.5"
9-
ktlint-plugin = "12.1.0"
10-
protobuf-plugin = "0.9.4"
11-
testlogger-plugin = "3.2.0"
7+
detekt-plugin = "1.23.8"
8+
kover-plugin = "0.9.1"
9+
ktlint-plugin = "12.3.0"
10+
protobuf-plugin = "0.9.5"
11+
testlogger-plugin = "4.0.0"
1212

13-
caffeine = "3.1.8"
14-
ipaddress = "5.4.0"
15-
jedis = "5.1.0"
16-
junit-jupiter = "5.10.1"
17-
kerby-asn1 = "2.0.3"
13+
caffeine = "3.2.2"
14+
ipaddress = "5.5.1"
15+
jedis = "6.0.0"
16+
junit-jupiter = "5.13.3"
17+
kerby-asn1 = "2.1.0"
1818
klaxon = "5.6"
19-
kotlin-logging = "3.0.5"
19+
kotlin-logging = "7.0.7"
2020
ktor = "2.2.4"
21-
logback-classic = "1.4.14"
22-
mockk = "1.13.9"
21+
logback-classic = "1.5.18"
22+
mockk = "1.14.5"
2323
multiformat = "1.1.0"
2424
noise-java = "0.1.1"
25-
protobuf = "3.25.2"
25+
protobuf = "4.31.1"
2626
reflections = "0.10.2"
2727
result-monad = "1.4.0"
28-
rocksdb = "8.10.0"
28+
rocksdb = "10.2.1"
2929
shadow = "8.1.1"
30-
slf4j-api = "2.0.11"
30+
slf4j-api = "2.0.17"
3131

32-
nexus-plugin = "1.3.0"
33-
versions-plugin = "0.51.0"
32+
nexus-plugin = "2.0.0"
33+
versions-plugin = "0.52.0"
3434

3535
[libraries]
3636
# Libraries for the build system
@@ -62,7 +62,7 @@ kotlinx-atomicfu = { module = "org.jetbrains.kotlinx:atomicfu", version.ref = "k
6262
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
6363
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" }
6464
kotlinx-coroutines-debug = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-debug", version.ref = "kotlinx-coroutines" }
65-
kotlin-logging = { module = "io.github.microutils:kotlin-logging-jvm", version.ref = "kotlin-logging" }
65+
kotlin-logging = { module = "io.github.oshai:kotlin-logging-jvm", version.ref = "kotlin-logging" }
6666
ktor-network = { module = "io.ktor:ktor-network", version.ref = "ktor" }
6767
logback-classic = { module = "ch.qos.logback:logback-classic", version.ref = "logback-classic" }
6868
multiformat = { module = "org.erwinkok.multiformat:multiformat", version.ref = "multiformat" }

gradle/wrapper/gradle-wrapper.jar

302 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)