diff options
author | igoriakovlev <54274820+igoriakovlev@users.noreply.github.com> | 2023-09-12 15:54:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-12 15:54:16 +0200 |
commit | 7ae7a2313828470118e7ee294a424941ac60a409 (patch) | |
tree | 55d10d20eeb080703f4b21799aea5d9b49876590 /formats/json-okio | |
parent | f4c3a70f23a7f3932a105064d26e29085a560c65 (diff) | |
download | kotlinx.serialization-7ae7a2313828470118e7ee294a424941ac60a409.tar.gz |
Add support of WASM target to mainline (#2410)
* Implement wasm target
* Slightly fix test data to suite wasm fp parser
Wasm fp parser has a different algorithm, so fix the tests to have similar results for all platforms
* Update okio version to 3.5.0
* Kotlin 1.9.30+ support
Diffstat (limited to 'formats/json-okio')
-rw-r--r-- | formats/json-okio/build.gradle.kts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/formats/json-okio/build.gradle.kts b/formats/json-okio/build.gradle.kts index 8d29e2e0..6d90b77b 100644 --- a/formats/json-okio/build.gradle.kts +++ b/formats/json-okio/build.gradle.kts @@ -44,3 +44,18 @@ 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}") + } + } + } +}
\ No newline at end of file |