summaryrefslogtreecommitdiff
path: root/formats
diff options
context:
space:
mode:
authorLeonid Startsev <sandwwraith@users.noreply.github.com>2023-10-18 16:04:52 +0200
committerGitHub <noreply@github.com>2023-10-18 16:04:52 +0200
commit6ac490287b08c9aec6e07cba3b503a8def67d4ba (patch)
tree14dcaeae2176114d303b0aab6b33ec32635debfe /formats
parente684f47f888ad400e8c6df9145eeaa790a00d4bb (diff)
downloadkotlinx.serialization-6ac490287b08c9aec6e07cba3b503a8def67d4ba.tar.gz
Build improvements: Kotlin 1.9.20-RC, default target hierarchy, bump Okio (#2473)
* Build improvements: Kotlin 1.9.20-RC, default target hierarchy, bump Okio Updated to Kotlin 1.9.20-RC: - Kotlin 1.9.0/10 had some blockers in XCode 15 support. - Simplify WASM setup (it has been changed in 1.9.20). - Drop obsolete Native targets Apply default target hierarchy: - Greatly simplified buildscript for native targets. - Supported targets are now runnable from gutter in the IDE. - Now all possible targets are built by default (without -Pnative.deploy flag), resulting in less confusion for contributors and CI (but longer local `check` times). - Publishing library with K2 should be possible now, no more incorrect `publishNativeKotlinMetadata` failing task. - More targets available in integration-test project. Updated Okio for: - linuxArm64 target support
Diffstat (limited to 'formats')
-rw-r--r--formats/json-okio/build.gradle.kts13
-rw-r--r--formats/json-tests/build.gradle.kts21
-rw-r--r--formats/json/build.gradle13
3 files changed, 10 insertions, 37 deletions
diff --git a/formats/json-okio/build.gradle.kts b/formats/json-okio/build.gradle.kts
index 43859e4c..a51fff03 100644
--- a/formats/json-okio/build.gradle.kts
+++ b/formats/json-okio/build.gradle.kts
@@ -52,16 +52,11 @@ tasks.named<DokkaTaskPartial>("dokkaHtmlPartial") {
}
-// Right now it is used for conditional support of kotlin 1.9.0 and 1.9.20+
// TODO: Remove this after okio will be updated to the version with 1.9.20 stdlib dependency
-val kotlin_version: String by project
-val isNewWasmTargetEnabled = isKotlinVersionAtLeast(kotlin_version, 1, 9, 20)
-if (isNewWasmTargetEnabled) {
- configurations.all {
- resolutionStrategy.eachDependency {
- if (requested.name == "kotlin-stdlib-wasm") {
- useTarget("org.jetbrains.kotlin:kotlin-stdlib-wasm-js:${requested.version}")
- }
+configurations.all {
+ resolutionStrategy.eachDependency {
+ if (requested.name == "kotlin-stdlib-wasm") {
+ useTarget("org.jetbrains.kotlin:kotlin-stdlib-wasm-js:${requested.version}")
}
}
}
diff --git a/formats/json-tests/build.gradle.kts b/formats/json-tests/build.gradle.kts
index 3c84e29d..6be0a3a7 100644
--- a/formats/json-tests/build.gradle.kts
+++ b/formats/json-tests/build.gradle.kts
@@ -50,24 +50,11 @@ kotlin {
project.configureJava9ModuleInfo()
-// Right now it is used for conditional support of kotlin 1.9.0 and 1.9.20+
// TODO: Remove this after okio will be updated to the version with 1.9.20 stdlib dependency
-val kotlin_version: String by project
-val isNewWasmTargetEnabled = isKotlinVersionAtLeast(kotlin_version, 1, 9, 20)
-if (isNewWasmTargetEnabled) {
- configurations.all {
- resolutionStrategy.eachDependency {
- if (requested.name == "kotlin-stdlib-wasm") {
- useTarget("org.jetbrains.kotlin:kotlin-stdlib-wasm-js:${requested.version}")
- }
+configurations.all {
+ resolutionStrategy.eachDependency {
+ if (requested.name == "kotlin-stdlib-wasm") {
+ useTarget("org.jetbrains.kotlin:kotlin-stdlib-wasm-js:${requested.version}")
}
}
}
-
-// TODO: Remove this after default kotlin will be updated to 1.9.20
-// https://youtrack.jetbrains.com/issue/KT-60212
-if (!isNewWasmTargetEnabled) {
- tasks.named("wasmD8Test", KotlinJsTest::class) {
- filter.excludePatterns += "kotlinx.serialization.features.EmojiTest"
- }
-}
diff --git a/formats/json/build.gradle b/formats/json/build.gradle
index 105c8dec..a71366f5 100644
--- a/formats/json/build.gradle
+++ b/formats/json/build.gradle
@@ -20,9 +20,6 @@ tasks.named("koverVerify") {
enabled = false
}
-// Right now it is used for conditional support of kotlin 1.9.0 and 1.9.20+
-def isNewWasmTargetEnabled = isKotlinVersionAtLeast(rootProject.properties["kotlin_version"], 1, 9, 20)
-
kotlin {
sourceSets {
configureEach {
@@ -42,14 +39,8 @@ kotlin {
jsMain {
dependsOn(sourceSets.jsWasmMain)
}
- if (isNewWasmTargetEnabled) {
- wasmJsMain {
- dependsOn(sourceSets.jsWasmMain)
- }
- } else {
- wasmMain {
- dependsOn(sourceSets.jsWasmMain)
- }
+ wasmJsMain {
+ dependsOn(sourceSets.jsWasmMain)
}
}
}