Skip to content

Commit 2793d93

Browse files
authored
Update dependencies to support Kotlin 1.9 (#39)
Resolves #38
1 parent e3bd94b commit 2793d93

File tree

129 files changed

+2314
-1947
lines changed

Some content is hidden

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

129 files changed

+2314
-1947
lines changed

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ ij_json_wrap_long_lines = false
3333
[{*.kt,*.kts}]
3434
# noinspection EditorConfigKeyCorrectness
3535
ktlint_standard_package-name = disabled
36+
ktlint_standard_property-naming = disabled
3637
ij_kotlin_align_in_columns_case_branch = false
3738
ij_kotlin_align_multiline_binary_operation = false
3839
ij_kotlin_align_multiline_extends_list = false

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,11 @@ as a part of the CI to make sure the validation meet the expected behavior.
284284
Not everything is supported right now but the missing functionality might be added in the future.
285285
The test are located [here](test-suites).
286286

287+
## Developer notes
288+
289+
The update to Kotlin 1.9.22 came with an issue for JS incremental compilation.
290+
In case you see an error about main function that already bind please execute `clean` task.
291+
287292
## Future plans
288293

289294
- [x] Add `$schema` property validation (if not set the latest supported will be used)

api/json-schema-validator.api

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public final class io/github/optimumcode/json/schema/SchemaType : java/lang/Enum
6666
public static final field DRAFT_2020_12 Lio/github/optimumcode/json/schema/SchemaType;
6767
public static final field DRAFT_7 Lio/github/optimumcode/json/schema/SchemaType;
6868
public static final fun find (Ljava/lang/String;)Lio/github/optimumcode/json/schema/SchemaType;
69+
public static fun getEntries ()Lkotlin/enums/EnumEntries;
6970
public static fun valueOf (Ljava/lang/String;)Lio/github/optimumcode/json/schema/SchemaType;
7071
public static fun values ()[Lio/github/optimumcode/json/schema/SchemaType;
7172
}

build.gradle.kts

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import io.gitlab.arturbosch.detekt.Detekt
22
import org.jetbrains.kotlin.gradle.plugin.KotlinTarget
33
import org.jetbrains.kotlin.gradle.plugin.KotlinTargetWithTests
4-
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
54
import org.jlleitschuh.gradle.ktlint.reporter.ReporterType
65

7-
@Suppress("DSL_SCOPE_VIOLATION") // TODO: remove when migrate to Gradle 8
86
plugins {
97
alias(libs.plugins.kotlin.mutliplatform)
108
alias(libs.plugins.kotlin.serialization)
@@ -22,8 +20,6 @@ repositories {
2220
mavenCentral()
2321
}
2422

25-
val mainHost: String by project
26-
2723
kotlin {
2824
explicitApi()
2925
jvm {
@@ -44,41 +40,44 @@ kotlin {
4440
generateTypeScriptDefinitions()
4541
nodejs()
4642
}
47-
ios()
48-
49-
val macOsTargets = listOf<KotlinTarget>(
50-
macosX64(),
51-
macosArm64(),
52-
iosX64(),
53-
iosArm64(),
54-
iosSimulatorArm64(),
55-
)
56-
57-
val linuxTargets = listOf<KotlinTarget>(
58-
linuxX64(),
59-
linuxArm64(),
60-
)
61-
62-
val windowsTargets = listOf<KotlinTarget>(
63-
mingwX64(),
64-
)
43+
applyDefaultHierarchyTemplate()
44+
45+
val macOsTargets =
46+
listOf<KotlinTarget>(
47+
macosX64(),
48+
macosArm64(),
49+
iosX64(),
50+
iosArm64(),
51+
iosSimulatorArm64(),
52+
)
53+
54+
val linuxTargets =
55+
listOf<KotlinTarget>(
56+
linuxX64(),
57+
linuxArm64(),
58+
)
59+
60+
val windowsTargets =
61+
listOf<KotlinTarget>(
62+
mingwX64(),
63+
)
6564

6665
sourceSets {
67-
val commonMain by getting {
66+
commonMain {
6867
dependencies {
6968
api(libs.kotlin.serialization.json)
7069
implementation(libs.uri)
7170
}
7271
}
73-
val commonTest by getting {
72+
commonTest {
7473
dependencies {
7574
implementation(libs.kotest.assertions.core)
7675
implementation(libs.kotest.framework.engine)
7776
implementation(kotlin("test-common"))
7877
implementation(kotlin("test-annotations-common"))
7978
}
8079
}
81-
val jvmTest by getting {
80+
jvmTest {
8281
dependencies {
8382
implementation(libs.kotest.runner.junit5)
8483
}
@@ -113,10 +112,6 @@ kotlin {
113112
}
114113
}
115114

116-
extensions.configure<NodeJsRootExtension> {
117-
versions.webpack.version = "5.76.0"
118-
}
119-
120115
ktlint {
121116
version.set(libs.versions.ktlint)
122117
reporters {

buildSrc/src/main/kotlin/convention.publication.gradle.kts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,18 @@ afterEvaluate {
7171
tasks.withType<AbstractPublishToMaven> {
7272
mustRunAfter(signTasks)
7373
}
74+
75+
// Call toList to prevent concurrent modification exception
76+
signTasks.toList().forEach {
77+
val platform = it.name.substring(
78+
"sign".length,
79+
it.name.length - "Publication".length
80+
)
81+
tasks.findByName("linkDebugTest$platform")
82+
?.mustRunAfter(it)
83+
tasks.findByName("compileTestKotlin$platform")
84+
?.mustRunAfter(it)
85+
}
7486
}
7587

7688
signing {

config/detekt/detekt.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -652,8 +652,6 @@ style:
652652
active: true
653653
OptionalUnit:
654654
active: false
655-
OptionalWhenBraces:
656-
active: false
657655
PreferToOverPairSyntax:
658656
active: false
659657
ProtectedMemberInFinalClass:

gradle/libs.versions.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
[versions]
2-
kotlin = "1.8.22"
3-
kotest = "5.5.4"
4-
detekt = "1.23.0"
5-
ktlint = "0.50.0"
6-
okio = "3.4.0"
7-
serialization = "1.5.1"
2+
kotlin = "1.9.22"
3+
kotest = "5.8.0"
4+
detekt = "1.23.4"
5+
ktlint = "1.1.0"
6+
okio = "3.7.0"
7+
serialization = "1.6.2"
88

99
[plugins]
1010
kotlin-mutliplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
1111
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
12-
kotlin-dokka = { id = "org.jetbrains.dokka", version = "1.8.20" }
12+
kotlin-dokka = { id = "org.jetbrains.dokka", version = "1.9.10" }
1313
kotest-multiplatform = { id = "io.kotest.multiplatform", version.ref = "kotest" }
14-
kover = { id = "org.jetbrains.kotlinx.kover", version = "0.7.1" }
14+
kover = { id = "org.jetbrains.kotlinx.kover", version = "0.7.5" }
1515
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
16-
ktlint = { id = "org.jlleitschuh.gradle.ktlint", version = "11.5.0" }
16+
ktlint = { id = "org.jlleitschuh.gradle.ktlint", version = "12.0.3" }
1717
kotlin-binaryCompatibility = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version = "0.13.2" }
1818
nexus-publish = { id = "io.github.gradle-nexus.publish-plugin", version = "1.3.0" }
1919

@@ -23,6 +23,6 @@ kotlin-serialization-json-okio = { group = "org.jetbrains.kotlinx", name = "kotl
2323
kotest-assertions-core = { module = "io.kotest:kotest-assertions-core", version.ref = "kotest" }
2424
kotest-framework-engine = { module = "io.kotest:kotest-framework-engine", version.ref = "kotest" }
2525
kotest-runner-junit5 = { module = "io.kotest:kotest-runner-junit5", version.ref = "kotest" }
26-
uri = { group = "com.eygraber", name = "uri-kmp", version = "0.0.12" }
26+
uri = { group = "com.eygraber", name = "uri-kmp", version = "0.0.15" }
2727
okio-common = { group = "com.squareup.okio", name = "okio", version.ref = "okio" }
2828
okio-nodefilesystem = { group = "com.squareup.okio", name = "okio-nodefilesystem", version.ref = "okio" }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)