From fbbd8e640ca288b3bfbdbc6e6445c39c6b062212 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sat, 11 Jun 2022 20:27:00 +0600 Subject: [PATCH] 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()