From e6d04de433fd8222d3d2a8d720fb200e8a7878ab Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sat, 11 Jun 2022 19:35:59 +0600 Subject: [PATCH 1/4] start 0.2.1 and update dependencies --- gradle.properties | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gradle.properties b/gradle.properties index ef2605f..5f2edbb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,10 +11,10 @@ kotlin_serialisation_core_version=1.3.3 github_release_plugin_version=2.3.7 -tgbotapi_version=2.0.0 -micro_utils_version=0.10.4 +tgbotapi_version=2.0.2 +micro_utils_version=0.10.8 exposed_version=0.38.2 -plagubot_version=1.1.0 +plagubot_version=1.1.1 # ANDROID @@ -33,5 +33,5 @@ dokka_version=1.6.21 # Project data group=dev.inmo -version=0.2.0 -android_code_version=20 +version=0.2.1 +android_code_version=21 From 15c0f9979a95c7d8c53916670829d1e80a47f16c Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sat, 11 Jun 2022 19:45:29 +0600 Subject: [PATCH 2/4] fixes related to the new microutils --- .../inmo/tgbotapi/libraries/cache/admins/AdminsCacheAPI.kt | 4 ++-- gradle.properties | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cache/admins/micro_utils/src/jvmMain/kotlin/dev/inmo/tgbotapi/libraries/cache/admins/AdminsCacheAPI.kt b/cache/admins/micro_utils/src/jvmMain/kotlin/dev/inmo/tgbotapi/libraries/cache/admins/AdminsCacheAPI.kt index 56b7cfa..569e4a0 100644 --- a/cache/admins/micro_utils/src/jvmMain/kotlin/dev/inmo/tgbotapi/libraries/cache/admins/AdminsCacheAPI.kt +++ b/cache/admins/micro_utils/src/jvmMain/kotlin/dev/inmo/tgbotapi/libraries/cache/admins/AdminsCacheAPI.kt @@ -1,7 +1,7 @@ package dev.inmo.tgbotapi.libraries.cache.admins import dev.inmo.micro_utils.repos.exposed.keyvalue.ExposedKeyValueRepo -import dev.inmo.micro_utils.repos.exposed.onetomany.ExposedOneToManyKeyValueRepo +import dev.inmo.micro_utils.repos.exposed.onetomany.ExposedKeyValuesRepo import dev.inmo.micro_utils.repos.mappers.withMapper import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext @@ -36,7 +36,7 @@ fun AdminsCacheAPI( ) : AdminsCacheAPI = DefaultAdminsCacheAPI( bot, DefaultAdminsCacheAPIRepo( - ExposedOneToManyKeyValueRepo( + ExposedKeyValuesRepo( database, { long("chatId") }, { text("member") }, diff --git a/gradle.properties b/gradle.properties index 5f2edbb..e90513b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,7 +12,7 @@ kotlin_serialisation_core_version=1.3.3 github_release_plugin_version=2.3.7 tgbotapi_version=2.0.2 -micro_utils_version=0.10.8 +micro_utils_version=0.11.0 exposed_version=0.38.2 plagubot_version=1.1.1 From fbbd8e640ca288b3bfbdbc6e6445c39c6b062212 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sat, 11 Jun 2022 20:27:00 +0600 Subject: [PATCH 3/4] update build scripts --- .../micro_utils/SimpleKeyValueMessageContentCache.kt | 2 ++ mppJavaProject.gradle | 6 +++++- mppProjectWithSerialization.gradle | 8 +++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/cache/content/micro_utils/src/commonMain/kotlin/dev/inmo/tgbotapi/libraries/cache/media/micro_utils/SimpleKeyValueMessageContentCache.kt b/cache/content/micro_utils/src/commonMain/kotlin/dev/inmo/tgbotapi/libraries/cache/media/micro_utils/SimpleKeyValueMessageContentCache.kt index d259277..0953cdf 100644 --- a/cache/content/micro_utils/src/commonMain/kotlin/dev/inmo/tgbotapi/libraries/cache/media/micro_utils/SimpleKeyValueMessageContentCache.kt +++ b/cache/content/micro_utils/src/commonMain/kotlin/dev/inmo/tgbotapi/libraries/cache/media/micro_utils/SimpleKeyValueMessageContentCache.kt @@ -52,6 +52,8 @@ val chatIdToMessageIdentifierSerializer = PairSerializer( val messageContentSerializer = PolymorphicSerializer(MessageContent::class) +inline fun KeyValueRepo.asMessageContentCache() = SimpleKeyValueMessageContentCache(this) + inline fun KeyValueRepo.asMessageContentCache( serialFormatCreator: (SerializersModule) -> StringFormat = { Json { serializersModule = it } } ): StandardKeyValueRepo, MessageContent> { diff --git a/mppJavaProject.gradle b/mppJavaProject.gradle index f5eb0d4..5f6d62d 100644 --- a/mppJavaProject.gradle +++ b/mppJavaProject.gradle @@ -5,7 +5,11 @@ apply from: "$publishGradlePath" kotlin { jvm { - compilations.main.kotlinOptions.useIR = true + compilations.main { + kotlinOptions { + jvmTarget = "1.8" + } + } } sourceSets { diff --git a/mppProjectWithSerialization.gradle b/mppProjectWithSerialization.gradle index 4a910eb..d22d10b 100644 --- a/mppProjectWithSerialization.gradle +++ b/mppProjectWithSerialization.gradle @@ -4,7 +4,13 @@ project.group = "$group" apply from: "$publishGradlePath" kotlin { - jvm() + jvm { + compilations.main { + kotlinOptions { + jvmTarget = "1.8" + } + } + } js (IR) { browser() nodejs() From b2d3ded0dae3a99174b56d9e7272e15928278fd8 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Mon, 13 Jun 2022 00:07:30 +0600 Subject: [PATCH 4/4] Update gradle.properties --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index e90513b..d888764 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,7 +12,7 @@ kotlin_serialisation_core_version=1.3.3 github_release_plugin_version=2.3.7 tgbotapi_version=2.0.2 -micro_utils_version=0.11.0 +micro_utils_version=0.11.1 exposed_version=0.38.2 plagubot_version=1.1.1