Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 3 additions & 24 deletions json-schema-validator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,42 +24,21 @@ kotlin {
}

sourceSets {
val commonMain by getting {
commonMain {
dependencies {
api(libs.kotlin.serialization.json)
api(libs.uri)
// When using approach like above you won't be able to add because block
implementation(
libs.kotlin.codepoints
.get()
.toString(),
) {
implementation(libs.kotlin.codepoints.get().toString()) {
because("simplifies work with unicode codepoints")
}
implementation(libs.karacteristics)
}
}

val nonWasmJsMain by creating {
dependsOn(commonMain)

dependencies {
implementation(libs.normalize.get().toString()) {
because("provides normalization required by IDN-hostname format")
}
implementation(libs.karacteristics)
}
}

jvmMain {
dependsOn(nonWasmJsMain)
}
jsMain {
dependsOn(nonWasmJsMain)
}
nativeMain {
dependsOn(nonWasmJsMain)
}

commonTest {
dependencies {
implementation(libs.kotest.assertions.core)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
package io.github.optimumcode.json.schema.internal.hostname

internal expect fun isNormalized(label: String): Boolean
import doist.x.normalize.Form
import doist.x.normalize.normalize

internal fun isNormalized(label: String): Boolean {
return label.normalize(Form.NFC) == label
}

This file was deleted.

This file was deleted.

Loading