From 100bc5d844e4ea0485f899ea5efab6ae0515dada Mon Sep 17 00:00:00 2001 From: Erik Christensen Date: Tue, 30 Jun 2020 08:31:50 -0400 Subject: [PATCH 01/14] Build with Kotlin 1.4-M2 --- build.gradle.kts | 2 ++ buildSrc/build.gradle.kts | 3 ++- buildSrc/src/main/kotlin/Dependencies.kt | 13 +++++-------- core/build.gradle.kts | 1 - extensions/serialization/build.gradle.kts | 9 +-------- gradle.properties | 3 ++- settings.gradle.kts | 7 +++++++ 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index eb1b5d65d..208bf3dba 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,6 +5,7 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent buildscript { repositories { jcenter() + maven(url = "https://dl.bintray.com/kotlin/kotlin-eap") } dependencies { @@ -15,6 +16,7 @@ buildscript { allprojects { repositories { jcenter() + maven(url = "https://dl.bintray.com/kotlin/kotlin-eap") } tasks.withType().configureEach { diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 82c63fdd9..11f5f5b12 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -1,6 +1,7 @@ repositories { jcenter() google() + maven(url = "https://dl.bintray.com/kotlin/kotlin-eap") } plugins { @@ -8,7 +9,7 @@ plugins { } dependencies { - implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72") + implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4-M2") implementation("org.jetbrains.dokka:dokka-gradle-plugin:0.10.1") implementation("com.android.tools.build:gradle:4.0.0") } diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt index e30661302..3010a8cc7 100644 --- a/buildSrc/src/main/kotlin/Dependencies.kt +++ b/buildSrc/src/main/kotlin/Dependencies.kt @@ -1,25 +1,22 @@ object Versions { - const val kotlin = "1.3.72" - const val serialization = "0.20.0" - const val atomicfu = "0.14.2" + const val kotlin = "1.4-M2" + const val serialization = "0.20.0-1.4-M2" + const val atomicfu = "0.14.3-1.4-M2" const val androidxTest = "1.2.0" const val googleTruth = "1.0.1" const val threetenabp = "1.2.3" - const val stately = "1.0.2-a4" + const val stately = "1.0.4-a1-1.4-M2" const val kotlinpoet = "1.6.0" const val androidDesugarJdkLibs = "1.0.5" } object Libs { object Serialization { - const val common = "org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:${Versions.serialization}" - const val jvm = "org.jetbrains.kotlinx:kotlinx-serialization-runtime:${Versions.serialization}" - const val native = "org.jetbrains.kotlinx:kotlinx-serialization-runtime-native:${Versions.serialization}" + const val runtime = "org.jetbrains.kotlinx:kotlinx-serialization-runtime:${Versions.serialization}" } object AtomicFU { const val gradlePlugin = "org.jetbrains.kotlinx:atomicfu-gradle-plugin:${Versions.atomicfu}" - const val native = "org.jetbrains.kotlinx:atomicfu-native:${Versions.atomicfu}" } object AndroidxTest { diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 2ceee7e88..6aa49623a 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -44,7 +44,6 @@ kotlin { val darwinMain by getting { dependencies { implementation(Libs.statelyIsolate) - implementation(Libs.AtomicFU.native) } } } diff --git a/extensions/serialization/build.gradle.kts b/extensions/serialization/build.gradle.kts index 6c822cf15..30c2ff10b 100644 --- a/extensions/serialization/build.gradle.kts +++ b/extensions/serialization/build.gradle.kts @@ -9,7 +9,7 @@ kotlin { dependencies { implementation(project(":core")) implementation(kotlin("stdlib-common")) - implementation(Libs.Serialization.common) + implementation(Libs.Serialization.runtime) } } @@ -23,7 +23,6 @@ kotlin { val jvmMain by getting { dependencies { implementation(kotlin("stdlib-jdk8")) - implementation(Libs.Serialization.jvm) } } @@ -33,11 +32,5 @@ kotlin { implementation(kotlin("test-junit")) } } - - val darwinMain by getting { - dependencies { - implementation(Libs.Serialization.native) - } - } } } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index ab5223164..06101ed6c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,7 +14,8 @@ snapshotRepositoryUrl=https://oss.sonatype.org/content/repositories/snapshots releaseRepositoryUrl=https://oss.sonatype.org/service/local/staging/deploy/maven2 kotlin.code.style=official -kotlin.native.disableCompilerDaemon=true +kotlin.mpp.enableGranularSourceSetsMetadata=true +kotlin.native.enableDependencyPropagation=false org.gradle.parallel=true org.gradle.jvmargs=-Xmx4096M diff --git a/settings.gradle.kts b/settings.gradle.kts index 595b0c812..7d02aeb37 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,3 +1,10 @@ +pluginManagement { + repositories { + maven(url = "https://dl.bintray.com/kotlin/kotlin-eap") + gradlePluginPortal() + } +} + include( ":core", ":tools:code-generator", From 34817f721e7f959a7084f2247ef1dc66a59930bf Mon Sep 17 00:00:00 2001 From: Erik Christensen Date: Tue, 30 Jun 2020 10:30:56 -0400 Subject: [PATCH 02/14] Remove workarounds that should no longer be needed --- .../kotlin/multiplatform-library.gradle.kts | 44 +++++++++---------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/buildSrc/src/main/kotlin/multiplatform-library.gradle.kts b/buildSrc/src/main/kotlin/multiplatform-library.gradle.kts index 53fb8d44f..be4d9a92f 100644 --- a/buildSrc/src/main/kotlin/multiplatform-library.gradle.kts +++ b/buildSrc/src/main/kotlin/multiplatform-library.gradle.kts @@ -12,11 +12,15 @@ val ideaActive get() = System.getProperty("idea.active") == "true" kotlin { jvm() - val darwinTargets = if (ideaActive) { - listOf(iosX64("darwin")) - } else { - listOf(iosArm64(), iosX64(), macosX64(), watchosArm64(), watchosX86(), tvosArm64(), tvosX64()) - } + val darwinTargets = listOf( + iosArm64(), + iosX64(), + macosX64(), + watchosArm64(), + watchosX86(), + tvosArm64(), + tvosX64() + ) sourceSets { all { @@ -27,34 +31,26 @@ kotlin { } } - if (!ideaActive) { - val commonMain by getting - val commonTest by getting + val commonMain by getting + val commonTest by getting - val darwinMain by creating { - dependsOn(commonMain) - } + val darwinMain by creating { + dependsOn(commonMain) + } - val darwinTest by creating { - dependsOn(commonTest) - } + val darwinTest by creating { + dependsOn(commonTest) + } - configure(darwinTargets) { - compilations["main"].defaultSourceSet.dependsOn(darwinMain) - compilations["test"].defaultSourceSet.dependsOn(darwinTest) - } + configure(darwinTargets) { + compilations["main"].defaultSourceSet.dependsOn(darwinMain) + compilations["test"].defaultSourceSet.dependsOn(darwinTest) } } configure(darwinTargets) { compilations["main"].kotlinOptions.freeCompilerArgs += "-Xobjc-generics" } - - // Workaround for https://youtrack.jetbrains.com/issue/KT-36721 - targets.withType().configureEach { - val moduleName = "${project.group}.${project.name}" - compilations["main"].kotlinOptions.freeCompilerArgs += listOf("-module-name", moduleName) - } } val emptySourcesJar by tasks.registering(Jar::class) { From 0264432dfe6d5bfe292e8ff9ee44367e84d88a47 Mon Sep 17 00:00:00 2001 From: Erik Christensen Date: Fri, 10 Jul 2020 21:26:02 -0400 Subject: [PATCH 03/14] Update to Kotlin 1.4-M3 --- buildSrc/build.gradle.kts | 2 +- buildSrc/src/main/kotlin/Dependencies.kt | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 11f5f5b12..6f714d2c4 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -9,7 +9,7 @@ plugins { } dependencies { - implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4-M2") + implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4-M3") implementation("org.jetbrains.dokka:dokka-gradle-plugin:0.10.1") implementation("com.android.tools.build:gradle:4.0.0") } diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt index 24e995ab7..d9256e9bd 100644 --- a/buildSrc/src/main/kotlin/Dependencies.kt +++ b/buildSrc/src/main/kotlin/Dependencies.kt @@ -1,11 +1,11 @@ object Versions { - const val kotlin = "1.4-M2" - const val serialization = "0.20.0-1.4-M2" - const val atomicfu = "0.14.3-1.4-M2" + const val kotlin = "1.4-M3" + const val serialization = "0.20.0-1.4-M3" + const val atomicfu = "0.14.3-1.4-M3" const val androidxTest = "1.2.0" const val googleTruth = "1.0.1" const val threetenabp = "1.2.4" - const val stately = "1.0.4-a1-1.4-M2" + const val stately = "1.0.4-a1-1.4-M3" const val kotlinpoet = "1.6.0" const val androidDesugarJdkLibs = "1.0.9" } From bdf3c42df31d6f0a022936236c93e0138c2f4497 Mon Sep 17 00:00:00 2001 From: Erik Christensen Date: Sat, 11 Jul 2020 20:53:28 -0400 Subject: [PATCH 04/14] Revert removal of IDEA hack --- .../kotlin/multiplatform-library.gradle.kts | 42 ++++++++----------- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/buildSrc/src/main/kotlin/multiplatform-library.gradle.kts b/buildSrc/src/main/kotlin/multiplatform-library.gradle.kts index be4d9a92f..c172b4bc8 100644 --- a/buildSrc/src/main/kotlin/multiplatform-library.gradle.kts +++ b/buildSrc/src/main/kotlin/multiplatform-library.gradle.kts @@ -12,15 +12,11 @@ val ideaActive get() = System.getProperty("idea.active") == "true" kotlin { jvm() - val darwinTargets = listOf( - iosArm64(), - iosX64(), - macosX64(), - watchosArm64(), - watchosX86(), - tvosArm64(), - tvosX64() - ) + val darwinTargets = if (ideaActive) { + listOf(iosX64("darwin")) + } else { + listOf(iosArm64(), iosX64(), macosX64(), watchosArm64(), watchosX86(), tvosArm64(), tvosX64()) + } sourceSets { all { @@ -31,26 +27,24 @@ kotlin { } } - val commonMain by getting - val commonTest by getting + if (!ideaActive) { + val commonMain by getting + val commonTest by getting - val darwinMain by creating { - dependsOn(commonMain) - } + val darwinMain by creating { + dependsOn(commonMain) + } - val darwinTest by creating { - dependsOn(commonTest) - } + val darwinTest by creating { + dependsOn(commonTest) + } - configure(darwinTargets) { - compilations["main"].defaultSourceSet.dependsOn(darwinMain) - compilations["test"].defaultSourceSet.dependsOn(darwinTest) + configure(darwinTargets) { + compilations["main"].defaultSourceSet.dependsOn(darwinMain) + compilations["test"].defaultSourceSet.dependsOn(darwinTest) + } } } - - configure(darwinTargets) { - compilations["main"].kotlinOptions.freeCompilerArgs += "-Xobjc-generics" - } } val emptySourcesJar by tasks.registering(Jar::class) { From 7be64ea0406ff07331992e1648fbeffccc02cd4b Mon Sep 17 00:00:00 2001 From: Erik Christensen Date: Sat, 11 Jul 2020 20:54:30 -0400 Subject: [PATCH 05/14] Enable MPP compatibility mode --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 06101ed6c..a4a330cce 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,7 +15,7 @@ releaseRepositoryUrl=https://oss.sonatype.org/service/local/staging/deploy/maven kotlin.code.style=official kotlin.mpp.enableGranularSourceSetsMetadata=true -kotlin.native.enableDependencyPropagation=false +kotlin.mpp.enableCompatibilityMetadataVariant=true org.gradle.parallel=true org.gradle.jvmargs=-Xmx4096M From 3eaf4c8ed777597bfea5e6f5c67304354d9e96b9 Mon Sep 17 00:00:00 2001 From: Erik Christensen Date: Sun, 12 Jul 2020 18:00:35 -0400 Subject: [PATCH 06/14] Prepare for 0.2.3-1.4-M3 release --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index c2e047c5c..5ab4da35d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ group=io.islandtime -version=0.2.3 +version=0.2.3-1.4-M3 pomUrl=https://islandtime.io pomScmUrl=https://github.com/erikc5000/island-time From 61e42716dee34e0f6c81cb6fba6603d4e538c042 Mon Sep 17 00:00:00 2001 From: Erik Christensen Date: Sun, 12 Jul 2020 19:43:51 -0400 Subject: [PATCH 07/14] Restore AtomicFU runtime dependency --- buildSrc/src/main/kotlin/Dependencies.kt | 1 + core/build.gradle.kts | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt index 560ee469c..7c542ead3 100644 --- a/buildSrc/src/main/kotlin/Dependencies.kt +++ b/buildSrc/src/main/kotlin/Dependencies.kt @@ -16,6 +16,7 @@ object Libs { object AtomicFU { const val gradlePlugin = "org.jetbrains.kotlinx:atomicfu-gradle-plugin:${Versions.atomicfu}" + const val runtime = "org.jetbrains.kotlinx:atomicfu:${Versions.atomicfu}" } object AndroidxTest { diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 801860e67..f6b219b71 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -40,6 +40,12 @@ kotlin { implementation(Libs.googleTruth) } } + + val darwinMain by getting { + dependencies { + implementation(Libs.AtomicFU.runtime) + } + } } } From 68bf43d45755330d6d9c5398aa9dc88e0bba260b Mon Sep 17 00:00:00 2001 From: Erik Christensen Date: Sat, 25 Jul 2020 20:32:45 -0400 Subject: [PATCH 08/14] Work around Kotlin 1.4 compiler error --- core/src/darwinMain/kotlin/io/islandtime/zone/TimeZoneRules.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/darwinMain/kotlin/io/islandtime/zone/TimeZoneRules.kt b/core/src/darwinMain/kotlin/io/islandtime/zone/TimeZoneRules.kt index 26f3c111f..f64aaef79 100644 --- a/core/src/darwinMain/kotlin/io/islandtime/zone/TimeZoneRules.kt +++ b/core/src/darwinMain/kotlin/io/islandtime/zone/TimeZoneRules.kt @@ -127,7 +127,7 @@ private class DarwinTimeZoneRules(timeZone: NSTimeZone) : TimeZoneRules { val offsetAfter = offsetAt(nextTransition) val dateTimeBefore = nextTransition.toIslandDateTimeAt(offsetBefore) - this += DarwinTimeZoneOffsetTransition(dateTimeBefore, offsetBefore, offsetAfter) + add(DarwinTimeZoneOffsetTransition(dateTimeBefore, offsetBefore, offsetAfter)) currentDate = nextTransition nextTransition = timeZone.nextDaylightSavingTimeTransitionAfterDate(currentDate) From d8329231f0bc38c8f49f712e65467a4693aed86f Mon Sep 17 00:00:00 2001 From: Erik Christensen Date: Sun, 26 Jul 2020 07:05:25 -0400 Subject: [PATCH 09/14] Prepare for 0.2.4-1.4-M3 release --- gradle.properties | 2 +- mkdocs.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index cd38541fb..bb14cbcd3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ group=io.islandtime -version=0.3.0-1.4-M3-SNAPSHOT +version=0.2.4-1.4-M3 pomUrl=https://islandtime.io pomScmUrl=https://github.com/erikc5000/island-time diff --git a/mkdocs.yml b/mkdocs.yml index 87027452f..28b5b0d50 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -54,4 +54,4 @@ plugins: extra: versions: - islandtime: '0.2.3' \ No newline at end of file + islandtime: '0.2.4' \ No newline at end of file From 0d9b5402ea1e63ec97e303420a4253504c8e2fa9 Mon Sep 17 00:00:00 2001 From: Erik Christensen Date: Sun, 26 Jul 2020 07:57:31 -0400 Subject: [PATCH 10/14] Prepare for next release --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index bb14cbcd3..cd38541fb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ group=io.islandtime -version=0.2.4-1.4-M3 +version=0.3.0-1.4-M3-SNAPSHOT pomUrl=https://islandtime.io pomScmUrl=https://github.com/erikc5000/island-time From 92fa0d5e2e76286c04ff4061988b1e6aa7faceb7 Mon Sep 17 00:00:00 2001 From: Erik Christensen Date: Mon, 27 Jul 2020 13:04:07 -0400 Subject: [PATCH 11/14] Bump Kotlin to 1.4.0-rc --- build.gradle.kts | 2 - buildSrc/build.gradle.kts | 3 +- buildSrc/src/main/kotlin/Dependencies.kt | 6 +- core/build.gradle.kts | 10 -- extensions/parcelize/build.gradle.kts | 1 - extensions/serialization/build.gradle.kts | 7 -- .../extensions/serialization/Date.kt | 9 +- .../extensions/serialization/DateTime.kt | 9 +- .../extensions/serialization/Instant.kt | 9 +- .../serialization/OffsetDateTime.kt | 9 +- .../extensions/serialization/OffsetTime.kt | 9 +- .../extensions/serialization/Time.kt | 9 +- .../extensions/serialization/TimeZone.kt | 9 +- .../extensions/serialization/YearMonth.kt | 9 +- .../extensions/serialization/ZonedDateTime.kt | 9 +- .../serialization/measures/Duration.kt | 12 ++- .../serialization/measures/Period.kt | 12 ++- .../serialization/ranges/DateRange.kt | 9 +- .../serialization/ranges/DateTimeInterval.kt | 9 +- .../serialization/ranges/InstantInterval.kt | 9 +- .../ranges/OffsetDateTimeInterval.kt | 9 +- .../ranges/ZonedDateTimeInterval.kt | 9 +- .../serialization/SerializerTest.kt | 93 ++++++++++--------- extensions/threetenabp/build.gradle.kts | 1 - tools/code-generator/build.gradle.kts | 1 - 25 files changed, 167 insertions(+), 107 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 208bf3dba..eb1b5d65d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,7 +5,6 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent buildscript { repositories { jcenter() - maven(url = "https://dl.bintray.com/kotlin/kotlin-eap") } dependencies { @@ -16,7 +15,6 @@ buildscript { allprojects { repositories { jcenter() - maven(url = "https://dl.bintray.com/kotlin/kotlin-eap") } tasks.withType().configureEach { diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index bbf1828fe..a7c88377b 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -1,7 +1,6 @@ repositories { jcenter() google() - maven(url = "https://dl.bintray.com/kotlin/kotlin-eap") } plugins { @@ -9,7 +8,7 @@ plugins { } dependencies { - implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4-M3") + implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.0-rc") implementation("org.jetbrains.dokka:dokka-gradle-plugin:0.10.1") implementation("com.android.tools.build:gradle:4.0.1") } diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt index 7c542ead3..da68a165b 100644 --- a/buildSrc/src/main/kotlin/Dependencies.kt +++ b/buildSrc/src/main/kotlin/Dependencies.kt @@ -1,7 +1,7 @@ object Versions { - const val kotlin = "1.4-M3" - const val serialization = "0.20.0-1.4-M3" - const val atomicfu = "0.14.3-1.4-M3" + const val kotlin = "1.4.0-rc" + const val serialization = "1.0-M1-1.4.0-rc" + const val atomicfu = "0.14.3-1.4.0-rc" const val androidxTest = "1.2.0" const val googleTruth = "1.0.1" const val threetenabp = "1.2.4" diff --git a/core/build.gradle.kts b/core/build.gradle.kts index f6b219b71..a20b4fd78 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -14,10 +14,6 @@ kotlin { sourceSets { val commonMain by getting { kotlin.srcDirs("src/commonMain/generated") - - dependencies { - implementation(kotlin("stdlib-common")) - } } val commonTest by getting { @@ -27,12 +23,6 @@ kotlin { } } - val jvmMain by getting { - dependencies { - implementation(kotlin("stdlib-jdk8")) - } - } - val jvmTest by getting { dependencies { implementation(kotlin("test")) diff --git a/extensions/parcelize/build.gradle.kts b/extensions/parcelize/build.gradle.kts index 2b1eb1b15..adb587c45 100644 --- a/extensions/parcelize/build.gradle.kts +++ b/extensions/parcelize/build.gradle.kts @@ -27,7 +27,6 @@ dependencies { coreLibraryDesugaring(Libs.androidDesugarJdkLibs) implementation(project(":core")) - implementation(kotlin("stdlib-jdk8")) androidTestImplementation(Libs.AndroidxTest.runner) androidTestImplementation(Libs.googleTruth) diff --git a/extensions/serialization/build.gradle.kts b/extensions/serialization/build.gradle.kts index 30c2ff10b..4f50dd4ae 100644 --- a/extensions/serialization/build.gradle.kts +++ b/extensions/serialization/build.gradle.kts @@ -8,7 +8,6 @@ kotlin { val commonMain by getting { dependencies { implementation(project(":core")) - implementation(kotlin("stdlib-common")) implementation(Libs.Serialization.runtime) } } @@ -20,12 +19,6 @@ kotlin { } } - val jvmMain by getting { - dependencies { - implementation(kotlin("stdlib-jdk8")) - } - } - val jvmTest by getting { dependencies { implementation(kotlin("test")) diff --git a/extensions/serialization/src/commonMain/kotlin/io/islandtime/extensions/serialization/Date.kt b/extensions/serialization/src/commonMain/kotlin/io/islandtime/extensions/serialization/Date.kt index 0b554f5bf..e976bf4b4 100644 --- a/extensions/serialization/src/commonMain/kotlin/io/islandtime/extensions/serialization/Date.kt +++ b/extensions/serialization/src/commonMain/kotlin/io/islandtime/extensions/serialization/Date.kt @@ -2,11 +2,16 @@ package io.islandtime.extensions.serialization import io.islandtime.Date import io.islandtime.toDate -import kotlinx.serialization.* +import kotlinx.serialization.KSerializer +import kotlinx.serialization.descriptors.PrimitiveKind +import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor +import kotlinx.serialization.descriptors.SerialDescriptor +import kotlinx.serialization.encoding.Decoder +import kotlinx.serialization.encoding.Encoder object DateSerializer : KSerializer { override val descriptor: SerialDescriptor = - PrimitiveDescriptor("io.islandtime.DateSerializer", PrimitiveKind.STRING) + PrimitiveSerialDescriptor("io.islandtime.DateSerializer", PrimitiveKind.STRING) override fun serialize(encoder: Encoder, value: Date) { encoder.encodeString(value.toString()) diff --git a/extensions/serialization/src/commonMain/kotlin/io/islandtime/extensions/serialization/DateTime.kt b/extensions/serialization/src/commonMain/kotlin/io/islandtime/extensions/serialization/DateTime.kt index 7e4a93cc5..ffc732505 100644 --- a/extensions/serialization/src/commonMain/kotlin/io/islandtime/extensions/serialization/DateTime.kt +++ b/extensions/serialization/src/commonMain/kotlin/io/islandtime/extensions/serialization/DateTime.kt @@ -2,11 +2,16 @@ package io.islandtime.extensions.serialization import io.islandtime.DateTime import io.islandtime.toDateTime -import kotlinx.serialization.* +import kotlinx.serialization.KSerializer +import kotlinx.serialization.descriptors.PrimitiveKind +import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor +import kotlinx.serialization.descriptors.SerialDescriptor +import kotlinx.serialization.encoding.Decoder +import kotlinx.serialization.encoding.Encoder object DateTimeSerializer : KSerializer { override val descriptor: SerialDescriptor = - PrimitiveDescriptor("io.islandtime.DateTimeSerializer", PrimitiveKind.STRING) + PrimitiveSerialDescriptor("io.islandtime.DateTimeSerializer", PrimitiveKind.STRING) override fun serialize(encoder: Encoder, value: DateTime) { encoder.encodeString(value.toString()) diff --git a/extensions/serialization/src/commonMain/kotlin/io/islandtime/extensions/serialization/Instant.kt b/extensions/serialization/src/commonMain/kotlin/io/islandtime/extensions/serialization/Instant.kt index 490343bc2..28cbb9192 100644 --- a/extensions/serialization/src/commonMain/kotlin/io/islandtime/extensions/serialization/Instant.kt +++ b/extensions/serialization/src/commonMain/kotlin/io/islandtime/extensions/serialization/Instant.kt @@ -2,11 +2,16 @@ package io.islandtime.extensions.serialization import io.islandtime.Instant import io.islandtime.toInstant -import kotlinx.serialization.* +import kotlinx.serialization.KSerializer +import kotlinx.serialization.descriptors.PrimitiveKind +import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor +import kotlinx.serialization.descriptors.SerialDescriptor +import kotlinx.serialization.encoding.Decoder +import kotlinx.serialization.encoding.Encoder object InstantSerializer : KSerializer { override val descriptor: SerialDescriptor = - PrimitiveDescriptor("io.islandtime.InstantSerializer", PrimitiveKind.STRING) + PrimitiveSerialDescriptor("io.islandtime.InstantSerializer", PrimitiveKind.STRING) override fun serialize(encoder: Encoder, value: Instant) { encoder.encodeString(value.toString()) diff --git a/extensions/serialization/src/commonMain/kotlin/io/islandtime/extensions/serialization/OffsetDateTime.kt b/extensions/serialization/src/commonMain/kotlin/io/islandtime/extensions/serialization/OffsetDateTime.kt index 66ed35560..858b17b13 100644 --- a/extensions/serialization/src/commonMain/kotlin/io/islandtime/extensions/serialization/OffsetDateTime.kt +++ b/extensions/serialization/src/commonMain/kotlin/io/islandtime/extensions/serialization/OffsetDateTime.kt @@ -2,11 +2,16 @@ package io.islandtime.extensions.serialization import io.islandtime.OffsetDateTime import io.islandtime.toOffsetDateTime -import kotlinx.serialization.* +import kotlinx.serialization.KSerializer +import kotlinx.serialization.descriptors.PrimitiveKind +import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor +import kotlinx.serialization.descriptors.SerialDescriptor +import kotlinx.serialization.encoding.Decoder +import kotlinx.serialization.encoding.Encoder object OffsetDateTimeSerializer : KSerializer { override val descriptor: SerialDescriptor = - PrimitiveDescriptor("io.islandtime.OffsetDateTimeSerializer", PrimitiveKind.STRING) + PrimitiveSerialDescriptor("io.islandtime.OffsetDateTimeSerializer", PrimitiveKind.STRING) override fun serialize(encoder: Encoder, value: OffsetDateTime) { encoder.encodeString(value.toString()) diff --git a/extensions/serialization/src/commonMain/kotlin/io/islandtime/extensions/serialization/OffsetTime.kt b/extensions/serialization/src/commonMain/kotlin/io/islandtime/extensions/serialization/OffsetTime.kt index a98bff1bd..0053b2445 100644 --- a/extensions/serialization/src/commonMain/kotlin/io/islandtime/extensions/serialization/OffsetTime.kt +++ b/extensions/serialization/src/commonMain/kotlin/io/islandtime/extensions/serialization/OffsetTime.kt @@ -2,11 +2,16 @@ package io.islandtime.extensions.serialization import io.islandtime.OffsetTime import io.islandtime.toOffsetTime -import kotlinx.serialization.* +import kotlinx.serialization.KSerializer +import kotlinx.serialization.descriptors.PrimitiveKind +import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor +import kotlinx.serialization.descriptors.SerialDescriptor +import kotlinx.serialization.encoding.Decoder +import kotlinx.serialization.encoding.Encoder object OffsetTimeSerializer : KSerializer { override val descriptor: SerialDescriptor = - PrimitiveDescriptor("io.islandtime.OffsetTimeSerializer", PrimitiveKind.STRING) + PrimitiveSerialDescriptor("io.islandtime.OffsetTimeSerializer", PrimitiveKind.STRING) override fun serialize(encoder: Encoder, value: OffsetTime) { encoder.encodeString(value.toString()) diff --git a/extensions/serialization/src/commonMain/kotlin/io/islandtime/extensions/serialization/Time.kt b/extensions/serialization/src/commonMain/kotlin/io/islandtime/extensions/serialization/Time.kt index 8b312f9ab..54a1a6dd9 100644 --- a/extensions/serialization/src/commonMain/kotlin/io/islandtime/extensions/serialization/Time.kt +++ b/extensions/serialization/src/commonMain/kotlin/io/islandtime/extensions/serialization/Time.kt @@ -2,11 +2,16 @@ package io.islandtime.extensions.serialization import io.islandtime.Time import io.islandtime.toTime -import kotlinx.serialization.* +import kotlinx.serialization.KSerializer +import kotlinx.serialization.descriptors.PrimitiveKind +import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor +import kotlinx.serialization.descriptors.SerialDescriptor +import kotlinx.serialization.encoding.Decoder +import kotlinx.serialization.encoding.Encoder object TimeSerializer : KSerializer