From 1bb12bee0e753e2def522aa05858724c7ba2f980 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sat, 12 Aug 2023 23:58:28 +0600 Subject: [PATCH] fix of build --- common/src/commonMain/kotlin/DateTimeSerializer.kt | 2 +- posts/src/commonMain/kotlin/models/Post.kt | 2 +- posts/src/commonMain/kotlin/repo/ReadPostsRepo.kt | 2 +- posts/src/jvmMain/kotlin/cached/CachedPostsRepo.kt | 3 ++- posts/src/jvmMain/kotlin/exposed/ExposedPostsRepo.kt | 2 +- ratings/gc/src/jvmMain/kotlin/Plugin.kt | 4 ++-- .../selector/src/commonMain/kotlin/DefaultSelector.kt | 2 +- ratings/selector/src/commonMain/kotlin/Selector.kt | 2 +- .../src/commonMain/kotlin/models/RatingConfig.kt | 4 ++-- .../src/commonMain/kotlin/models/SelectorConfig.kt | 4 ++-- .../src/commonMain/kotlin/models/TimeConfig.kt | 2 +- .../src/commonMain/kotlin/buttons/RootButtons.kt | 2 +- .../src/commonMain/kotlin/AutopostFilter.kt | 2 +- .../selector_with_timer/src/jvmMain/kotlin/Plugin.kt | 2 +- triggers/timer/src/commonMain/kotlin/ButtonsBuilder.kt | 10 +++++----- .../kotlin/NearestAvailablePublishingTime.kt | 4 ++-- triggers/timer/src/commonMain/kotlin/TimersHandler.kt | 2 +- triggers/timer/src/commonMain/kotlin/TimersRepo.kt | 2 +- triggers/timer/src/jvmMain/kotlin/Plugin.kt | 2 +- .../timer/src/jvmMain/kotlin/repo/ExposedTimersRepo.kt | 2 +- 20 files changed, 29 insertions(+), 28 deletions(-) diff --git a/common/src/commonMain/kotlin/DateTimeSerializer.kt b/common/src/commonMain/kotlin/DateTimeSerializer.kt index a4a3ec4..0251600 100644 --- a/common/src/commonMain/kotlin/DateTimeSerializer.kt +++ b/common/src/commonMain/kotlin/DateTimeSerializer.kt @@ -1,6 +1,6 @@ package dev.inmo.plaguposter.common -import com.soywiz.klock.DateTime +import korlibs.time.DateTime import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializer import kotlinx.serialization.builtins.serializer diff --git a/posts/src/commonMain/kotlin/models/Post.kt b/posts/src/commonMain/kotlin/models/Post.kt index d624964..3445b2b 100644 --- a/posts/src/commonMain/kotlin/models/Post.kt +++ b/posts/src/commonMain/kotlin/models/Post.kt @@ -1,6 +1,6 @@ package dev.inmo.plaguposter.posts.models -import com.soywiz.klock.DateTime +import korlibs.time.DateTime import dev.inmo.plaguposter.common.DateTimeSerializer import dev.inmo.tgbotapi.types.ChatId import kotlinx.serialization.Serializable diff --git a/posts/src/commonMain/kotlin/repo/ReadPostsRepo.kt b/posts/src/commonMain/kotlin/repo/ReadPostsRepo.kt index 7d0c5d1..b161282 100644 --- a/posts/src/commonMain/kotlin/repo/ReadPostsRepo.kt +++ b/posts/src/commonMain/kotlin/repo/ReadPostsRepo.kt @@ -1,6 +1,6 @@ package dev.inmo.plaguposter.posts.repo -import com.soywiz.klock.DateTime +import korlibs.time.DateTime import dev.inmo.micro_utils.repos.ReadCRUDRepo import dev.inmo.plaguposter.posts.models.* import dev.inmo.tgbotapi.types.ChatId diff --git a/posts/src/jvmMain/kotlin/cached/CachedPostsRepo.kt b/posts/src/jvmMain/kotlin/cached/CachedPostsRepo.kt index 1d69be4..a410201 100644 --- a/posts/src/jvmMain/kotlin/cached/CachedPostsRepo.kt +++ b/posts/src/jvmMain/kotlin/cached/CachedPostsRepo.kt @@ -1,6 +1,6 @@ package dev.inmo.plaguposter.posts.cached -import com.soywiz.klock.DateTime +import korlibs.time.DateTime import dev.inmo.micro_utils.pagination.FirstPagePagination import dev.inmo.micro_utils.pagination.firstPageWithOneElementPagination import dev.inmo.micro_utils.pagination.utils.doForAllWithNextPaging @@ -25,6 +25,7 @@ class CachedPostsRepo( parentRepo, kvCache, scope, + skipStartInvalidate = false, { it.id } ) { override val removedPostsFlow: Flow by parentRepo::removedPostsFlow diff --git a/posts/src/jvmMain/kotlin/exposed/ExposedPostsRepo.kt b/posts/src/jvmMain/kotlin/exposed/ExposedPostsRepo.kt index 170b505..84fc4a9 100644 --- a/posts/src/jvmMain/kotlin/exposed/ExposedPostsRepo.kt +++ b/posts/src/jvmMain/kotlin/exposed/ExposedPostsRepo.kt @@ -1,7 +1,7 @@ package dev.inmo.plaguposter.posts.exposed import com.benasher44.uuid.uuid4 -import com.soywiz.klock.DateTime +import korlibs.time.DateTime import dev.inmo.micro_utils.repos.KeyValuesRepo import dev.inmo.micro_utils.repos.UpdatedValuePair import dev.inmo.micro_utils.repos.exposed.AbstractExposedCRUDRepo diff --git a/ratings/gc/src/jvmMain/kotlin/Plugin.kt b/ratings/gc/src/jvmMain/kotlin/Plugin.kt index 77f9ad9..f3d377c 100644 --- a/ratings/gc/src/jvmMain/kotlin/Plugin.kt +++ b/ratings/gc/src/jvmMain/kotlin/Plugin.kt @@ -1,7 +1,7 @@ package dev.inmo.plaguposter.ratings.gc -import com.soywiz.klock.DateTime -import com.soywiz.klock.seconds +import korlibs.time.DateTime +import korlibs.time.seconds import dev.inmo.krontab.KrontabTemplate import dev.inmo.krontab.toSchedule import dev.inmo.krontab.utils.asFlowWithDelays diff --git a/ratings/selector/src/commonMain/kotlin/DefaultSelector.kt b/ratings/selector/src/commonMain/kotlin/DefaultSelector.kt index fafeb3f..a1195df 100644 --- a/ratings/selector/src/commonMain/kotlin/DefaultSelector.kt +++ b/ratings/selector/src/commonMain/kotlin/DefaultSelector.kt @@ -1,6 +1,6 @@ package dev.inmo.plaguposter.ratings.selector -import com.soywiz.klock.DateTime +import korlibs.time.DateTime import dev.inmo.plaguposter.posts.models.PostId import dev.inmo.plaguposter.posts.repo.PostsRepo import dev.inmo.plaguposter.ratings.repo.RatingsRepo diff --git a/ratings/selector/src/commonMain/kotlin/Selector.kt b/ratings/selector/src/commonMain/kotlin/Selector.kt index 134f6b1..4d670b2 100644 --- a/ratings/selector/src/commonMain/kotlin/Selector.kt +++ b/ratings/selector/src/commonMain/kotlin/Selector.kt @@ -1,6 +1,6 @@ package dev.inmo.plaguposter.ratings.selector -import com.soywiz.klock.DateTime +import korlibs.time.DateTime import dev.inmo.plaguposter.posts.models.PostId interface Selector { diff --git a/ratings/selector/src/commonMain/kotlin/models/RatingConfig.kt b/ratings/selector/src/commonMain/kotlin/models/RatingConfig.kt index e21a9ab..4c8046d 100644 --- a/ratings/selector/src/commonMain/kotlin/models/RatingConfig.kt +++ b/ratings/selector/src/commonMain/kotlin/models/RatingConfig.kt @@ -1,7 +1,7 @@ package dev.inmo.plaguposter.ratings.selector.models -import com.soywiz.klock.DateTime -import com.soywiz.klock.seconds +import korlibs.time.DateTime +import korlibs.time.seconds import dev.inmo.micro_utils.pagination.FirstPagePagination import dev.inmo.micro_utils.pagination.Pagination import dev.inmo.micro_utils.pagination.utils.getAllByWithNextPaging diff --git a/ratings/selector/src/commonMain/kotlin/models/SelectorConfig.kt b/ratings/selector/src/commonMain/kotlin/models/SelectorConfig.kt index da35cf5..30522e9 100644 --- a/ratings/selector/src/commonMain/kotlin/models/SelectorConfig.kt +++ b/ratings/selector/src/commonMain/kotlin/models/SelectorConfig.kt @@ -1,7 +1,7 @@ package dev.inmo.plaguposter.ratings.selector.models -import com.soywiz.klock.DateTime -import com.soywiz.klock.Time +import korlibs.time.DateTime +import korlibs.time.Time import kotlinx.serialization.Serializable @Serializable diff --git a/ratings/selector/src/commonMain/kotlin/models/TimeConfig.kt b/ratings/selector/src/commonMain/kotlin/models/TimeConfig.kt index 826b579..a8d720b 100644 --- a/ratings/selector/src/commonMain/kotlin/models/TimeConfig.kt +++ b/ratings/selector/src/commonMain/kotlin/models/TimeConfig.kt @@ -1,6 +1,6 @@ package dev.inmo.plaguposter.ratings.selector.models -import com.soywiz.klock.* +import korlibs.time.* import kotlinx.serialization.* import kotlinx.serialization.builtins.serializer import kotlinx.serialization.descriptors.SerialDescriptor diff --git a/ratings/source/src/commonMain/kotlin/buttons/RootButtons.kt b/ratings/source/src/commonMain/kotlin/buttons/RootButtons.kt index 8931da9..ccba53c 100644 --- a/ratings/source/src/commonMain/kotlin/buttons/RootButtons.kt +++ b/ratings/source/src/commonMain/kotlin/buttons/RootButtons.kt @@ -1,6 +1,6 @@ package dev.inmo.plaguposter.ratings.source.buttons -import com.soywiz.klock.DateFormat +import korlibs.time.DateFormat import dev.inmo.kslog.common.TagLogger import dev.inmo.kslog.common.d import dev.inmo.kslog.common.i diff --git a/triggers/selector_with_timer/src/commonMain/kotlin/AutopostFilter.kt b/triggers/selector_with_timer/src/commonMain/kotlin/AutopostFilter.kt index 66cd842..58e8978 100644 --- a/triggers/selector_with_timer/src/commonMain/kotlin/AutopostFilter.kt +++ b/triggers/selector_with_timer/src/commonMain/kotlin/AutopostFilter.kt @@ -1,6 +1,6 @@ package dev.inmo.plaguposter.triggers.selector_with_timer -import com.soywiz.klock.DateTime +import korlibs.time.DateTime import dev.inmo.plaguposter.posts.models.PostId fun interface AutopostFilter { diff --git a/triggers/selector_with_timer/src/jvmMain/kotlin/Plugin.kt b/triggers/selector_with_timer/src/jvmMain/kotlin/Plugin.kt index 79c8487..84f463b 100644 --- a/triggers/selector_with_timer/src/jvmMain/kotlin/Plugin.kt +++ b/triggers/selector_with_timer/src/jvmMain/kotlin/Plugin.kt @@ -1,6 +1,6 @@ package dev.inmo.plaguposter.triggers.selector_with_timer -import com.soywiz.klock.DateFormat +import korlibs.time.DateFormat import dev.inmo.krontab.KrontabTemplate import dev.inmo.krontab.toSchedule import dev.inmo.krontab.utils.asFlowWithDelays diff --git a/triggers/timer/src/commonMain/kotlin/ButtonsBuilder.kt b/triggers/timer/src/commonMain/kotlin/ButtonsBuilder.kt index efb2d30..30bd5eb 100644 --- a/triggers/timer/src/commonMain/kotlin/ButtonsBuilder.kt +++ b/triggers/timer/src/commonMain/kotlin/ButtonsBuilder.kt @@ -1,10 +1,10 @@ package dev.inmo.plaguposter.triggers.timer -import com.soywiz.klock.DateFormat -import com.soywiz.klock.DateTime -import com.soywiz.klock.DateTimeTz -import com.soywiz.klock.Month -import com.soywiz.klock.Year +import korlibs.time.DateFormat +import korlibs.time.DateTime +import korlibs.time.DateTimeTz +import korlibs.time.Month +import korlibs.time.Year import dev.inmo.micro_utils.coroutines.runCatchingSafely import dev.inmo.micro_utils.repos.unset import dev.inmo.plaguposter.common.SuccessfulSymbol diff --git a/triggers/timer/src/commonMain/kotlin/NearestAvailablePublishingTime.kt b/triggers/timer/src/commonMain/kotlin/NearestAvailablePublishingTime.kt index 55db364..63fdc87 100644 --- a/triggers/timer/src/commonMain/kotlin/NearestAvailablePublishingTime.kt +++ b/triggers/timer/src/commonMain/kotlin/NearestAvailablePublishingTime.kt @@ -1,7 +1,7 @@ package dev.inmo.plaguposter.triggers.timer -import com.soywiz.klock.DateTime -import com.soywiz.klock.minutes +import korlibs.time.DateTime +import korlibs.time.minutes fun nearestAvailableTimerTime() = (DateTime.now() + 1.minutes).copyDayOfMonth( milliseconds = 0, diff --git a/triggers/timer/src/commonMain/kotlin/TimersHandler.kt b/triggers/timer/src/commonMain/kotlin/TimersHandler.kt index 074108a..ce26046 100644 --- a/triggers/timer/src/commonMain/kotlin/TimersHandler.kt +++ b/triggers/timer/src/commonMain/kotlin/TimersHandler.kt @@ -1,6 +1,6 @@ package dev.inmo.plaguposter.triggers.timer -import com.soywiz.klock.DateTime +import korlibs.time.DateTime import dev.inmo.micro_utils.coroutines.launchSafelyWithoutExceptions import dev.inmo.micro_utils.coroutines.plus import dev.inmo.micro_utils.coroutines.subscribeSafelyWithoutExceptions diff --git a/triggers/timer/src/commonMain/kotlin/TimersRepo.kt b/triggers/timer/src/commonMain/kotlin/TimersRepo.kt index f87dd6c..f62f682 100644 --- a/triggers/timer/src/commonMain/kotlin/TimersRepo.kt +++ b/triggers/timer/src/commonMain/kotlin/TimersRepo.kt @@ -1,6 +1,6 @@ package dev.inmo.plaguposter.triggers.timer -import com.soywiz.klock.DateTime +import korlibs.time.DateTime import dev.inmo.micro_utils.repos.KeyValueRepo import dev.inmo.plaguposter.posts.models.PostId diff --git a/triggers/timer/src/jvmMain/kotlin/Plugin.kt b/triggers/timer/src/jvmMain/kotlin/Plugin.kt index f305c53..f0c2602 100644 --- a/triggers/timer/src/jvmMain/kotlin/Plugin.kt +++ b/triggers/timer/src/jvmMain/kotlin/Plugin.kt @@ -1,6 +1,6 @@ package dev.inmo.plaguposter.triggers.timer -import com.soywiz.klock.DateTime +import korlibs.time.DateTime import dev.inmo.micro_utils.coroutines.runCatchingSafely import dev.inmo.micro_utils.coroutines.subscribeSafelyWithoutExceptions import dev.inmo.micro_utils.koin.singleWithRandomQualifierAndBinds diff --git a/triggers/timer/src/jvmMain/kotlin/repo/ExposedTimersRepo.kt b/triggers/timer/src/jvmMain/kotlin/repo/ExposedTimersRepo.kt index 425070c..e8baf87 100644 --- a/triggers/timer/src/jvmMain/kotlin/repo/ExposedTimersRepo.kt +++ b/triggers/timer/src/jvmMain/kotlin/repo/ExposedTimersRepo.kt @@ -1,6 +1,6 @@ package dev.inmo.plaguposter.triggers.timer.repo -import com.soywiz.klock.DateTime +import korlibs.time.DateTime import dev.inmo.micro_utils.common.firstNotNull import dev.inmo.micro_utils.coroutines.subscribeSafelyWithoutExceptions import dev.inmo.micro_utils.pagination.paginate