Skip to content

Commit 11d0e54

Browse files
authored
Update project dependencies (#71)
1 parent 9d31259 commit 11d0e54

File tree

11 files changed

+40
-49
lines changed

11 files changed

+40
-49
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
java-version: 11
2727

2828
- name: Build
29-
uses: gradle/gradle-build-action@v2
29+
uses: gradle/gradle-build-action@v3
3030
with:
3131
arguments: build --scan --full-stacktrace
3232

.github/workflows/githubpages.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
run: ./gradlew -Pversion=${{ github.event.release.tag_name }} dokkaHtml
2020

2121
- name: Deploy to gh-pages
22-
uses: peaceiris/actions-gh-pages@v3
22+
uses: peaceiris/actions-gh-pages@v4
2323
with:
2424
github_token: ${{ secrets.GITHUB_TOKEN }}
2525
publish_dir: ./docs

.github/workflows/publish.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
java-version: 11
3333

3434
- name: assemble
35-
uses: gradle/gradle-build-action@v2
35+
uses: gradle/gradle-build-action@v3
3636
with:
3737
arguments: assemble -Pversion=${{ inputs.version }}
3838

@@ -44,6 +44,6 @@ jobs:
4444
path: '**/build/reports/**'
4545

4646
- name: Publish final version
47-
uses: gradle/gradle-build-action@v2
47+
uses: gradle/gradle-build-action@v3
4848
with:
4949
arguments: -Pversion=${{ inputs.version }} publishAllPublicationsToMavenCentralRepository

.github/workflows/pull_request.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ jobs:
1212
fetch-depth: 0
1313

1414
- name: Set up Java
15-
uses: actions/setup-java@v3
15+
uses: actions/setup-java@v4
1616
with:
1717
distribution: 'zulu'
1818
java-version: 11
1919

2020
- name: Build
21-
uses: gradle/gradle-build-action@v2
21+
uses: gradle/gradle-build-action@v3
2222
with:
2323
arguments: build

build.gradle.kts

+11-6
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
1515
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
1616

1717
plugins {
18-
application
1918
alias(libs.plugins.kotlin)
2019
alias(libs.plugins.spotless)
2120
alias(libs.plugins.kotest.multiplatform)
@@ -33,7 +32,12 @@ repositories {
3332

3433
spotless {
3534
kotlin {
36-
ktfmt().googleStyle()
35+
ktfmt().kotlinlangStyle().configure {
36+
it.setBlockIndent(2)
37+
it.setContinuationIndent(2)
38+
it.setRemoveUnusedImports(true)
39+
it.setManageTrailingCommas(true)
40+
}
3741
}
3842
}
3943

@@ -54,9 +58,6 @@ tasks {
5458
exceptionFormat = TestExceptionFormat.FULL
5559
events = setOf(SKIPPED, FAILED, STANDARD_OUT, STANDARD_ERROR)
5660
}
57-
}
58-
59-
test {
6061
useJUnitPlatform()
6162
}
6263
}
@@ -71,7 +72,11 @@ kotlin {
7172
}
7273

7374
@OptIn(ExperimentalWasmDsl::class)
74-
wasmJs()
75+
wasmJs {
76+
browser()
77+
nodejs()
78+
d8()
79+
}
7580
linuxX64()
7681
macosX64()
7782
macosArm64()

gradle.properties

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g
12
kotlin.code.style=official
23

34
GROUP=io.github.nomisrev
45
SONATYPE_HOST=S01
56
RELEASE_SIGNING_ENABLED=true
67

7-
POM_NAME=kotlinx-serialization-jsonpath
8+
POM_ARTIFACT_ID=kotlinx-serialization-jsonpath
9+
POM_NAME=Kotlinx Serialization JsonPath
810
POM_DESCRIPTION=JsonPath offers a simple DSL to work with JsonElement from Kotlinx Serialization Json, this allows you to easily work with JSON in Kotlin in a typed manner.
911
POM_URL=https://github.com/nomisrev/kotlinx-serialization-jsonpath/
1012

gradle/wrapper/gradle-wrapper.properties

+1-1
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.7-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

libs.versions.toml

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[versions]
2-
arrow = "2.0.0-alpha.1"
3-
dokka = "1.9.20"
4-
kotlin = "2.0.0-RC3"
5-
kotest = "5.9.0"
6-
kover = "0.8.0"
7-
detekt = "1.23.5"
8-
kotest-arrow="1.4.0"
9-
kotlinx-json="1.6.3"
2+
arrow = "2.0.1"
3+
dokka = "2.0.0"
4+
kotlin = "2.1.10"
5+
kotest = "6.0.0.M2"
6+
kover = "0.9.1"
7+
detekt = "1.23.7"
8+
kotest-arrow="2.0.0"
9+
kotlinx-json="1.8.0"
1010
kotlinx-knit="0.5.0"
11-
publish="0.28.0"
11+
publish="0.30.0"
1212
knit="0.5.0"
13-
spotless="6.25.0"
13+
spotless="7.0.2"
1414

1515
[libraries]
1616
arrow-optics = { module = "io.arrow-kt:arrow-optics", version.ref = "arrow" }

settings.gradle.kts

-11
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ pluginManagement {
77
}
88
}
99

10-
plugins {
11-
id("com.gradle.enterprise") version "3.16.2"
12-
}
13-
1410
dependencyResolutionManagement {
1511
versionCatalogs {
1612
create("libs") {
@@ -23,10 +19,3 @@ dependencyResolutionManagement {
2319
gradlePluginPortal()
2420
}
2521
}
26-
27-
gradleEnterprise {
28-
buildScan {
29-
termsOfServiceUrl = "https://gradle.com/terms-of-service"
30-
termsOfServiceAgree = "yes"
31-
}
32-
}

src/commonTest/kotlin/io/github/nomisrev/JsonDSLSpec.kt

+9-12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package io.github.nomisrev
22

3-
import io.kotest.common.Platform
4-
import io.kotest.common.platform
53
import io.kotest.core.spec.style.StringSpec
64
import io.kotest.matchers.nulls.shouldBeNull
75
import io.kotest.matchers.shouldBe
@@ -99,63 +97,62 @@ class JsonDSLSpec : StringSpec({
9997
JsonPath.select("streets").getOrNull(cityJson) shouldBe (cityJson as? JsonObject)?.get("streets")
10098
}
10199
}
102-
103-
// See https://github.com/Kotlin/kotlinx.serialization/issues/1914
104-
"extract from object".config(enabled = platform != Platform.Native) {
100+
101+
"extract from object" {
105102
checkAll(Arb.json(Arb.city())) { cityJson ->
106103
JsonPath.extract(City.serializer())
107104
.getOrNull(cityJson) shouldBe Json.decodeFromJsonElement(City.serializer(), cityJson)
108105
}
109106
}
110107

111-
"get from array, using select and get".config(enabled = platform != Platform.Native) {
108+
"get from array, using select and get" {
112109
checkAll(Arb.json(Arb.city())) { cityJson ->
113110
JsonPath.select("streets")[0]
114111
.extract(Street.serializer())
115112
.getOrNull(cityJson) shouldBe Json.decodeFromJsonElement(City.serializer(), cityJson).streets.getOrNull(0)
116113
}
117114
}
118115

119-
"get from array, using get".config(enabled = platform != Platform.Native) {
116+
"get from array, using get" {
120117
checkAll(Arb.json(Arb.city())) { cityJson ->
121118
JsonPath["streets"][0]["name"].string
122119
.getOrNull(cityJson) shouldBe Json.decodeFromJsonElement(City.serializer(), cityJson).streets.getOrNull(0)?.name
123120
}
124121
}
125122

126-
"get from array, using get".config(enabled = platform != Platform.Native) {
123+
"get from array, using get range" {
127124
checkAll(Arb.json(Arb.city())) { cityJson ->
128125
JsonPath["streets"][0..0]["name"].string
129126
.getAll(cityJson)
130127
.getOrNull(0) shouldBe Json.decodeFromJsonElement(City.serializer(), cityJson).streets.getOrNull(0)?.name
131128
}
132129
}
133130

134-
"get from array, using select with special syntax".config(enabled = platform != Platform.Native) {
131+
"get from array, using select with special syntax" {
135132
checkAll(Arb.json(Arb.city())) { cityJson ->
136133
JsonPath.select("['streets']").select("[0]")
137134
.extract(Street.serializer())
138135
.getOrNull(cityJson) shouldBe Json.decodeFromJsonElement(City.serializer(), cityJson).streets.getOrNull(0)
139136
}
140137
}
141138

142-
"get from array, using path".config(enabled = platform != Platform.Native) {
139+
"get from array, using path" {
143140
checkAll(Arb.json(Arb.city())) { cityJson ->
144141
JsonPath.path("streets[0]")
145142
.extract(Street.serializer())
146143
.getOrNull(cityJson) shouldBe Json.decodeFromJsonElement(City.serializer(), cityJson).streets.getOrNull(0)
147144
}
148145
}
149146

150-
"get all elements from array".config(enabled = platform != Platform.Native) {
147+
"get all elements from array" {
151148
checkAll(Arb.json(Arb.city())) { cityJson ->
152149
JsonPath.select("streets").selectEvery("*").select("name")
153150
.string
154151
.getAll(cityJson) shouldBe Json.decodeFromJsonElement(City.serializer(), cityJson).streets.map { it.name }
155152
}
156153
}
157154

158-
"get all elements from array, using path".config(enabled = platform != Platform.Native) {
155+
"get all elements from array, using path" {
159156
checkAll(Arb.json(Arb.city())) { cityJson ->
160157
JsonPath.pathEvery("streets.*.name")
161158
.string

src/commonTest/kotlin/io/github/nomisrev/KotestConfig.kt

-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,4 @@ object KotestConfig : AbstractProjectConfig() {
1717
override val testCaseOrder: TestCaseOrder =
1818
TestCaseOrder.Random
1919

20-
21-
2220
}

0 commit comments

Comments
 (0)