From ce1d15ebb292f7113497f3cef7b7ff6fc2947609 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Tue, 5 Jan 2021 22:09:33 +0600 Subject: [PATCH] Revert "Revert "add klassindex"" This reverts commit 28a9bbd3104e6fceb70a4c20a9f76623e7348e08. --- tgbotapi.core/build.gradle | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/tgbotapi.core/build.gradle b/tgbotapi.core/build.gradle index 9d12635f6c..f0b7bb9a2c 100644 --- a/tgbotapi.core/build.gradle +++ b/tgbotapi.core/build.gradle @@ -3,6 +3,7 @@ buildscript { mavenLocal() jcenter() mavenCentral() + maven { url "https://plugins.gradle.org/m2/" } } dependencies { @@ -14,6 +15,7 @@ buildscript { plugins { id "org.jetbrains.kotlin.multiplatform" id "org.jetbrains.kotlin.plugin.serialization" + id "org.jetbrains.kotlin.kapt" } project.version = "$library_version" @@ -26,6 +28,7 @@ repositories { jcenter() mavenCentral() maven { url "https://kotlin.bintray.com/kotlinx" } + maven { url 'https://jitpack.io' } } kotlin { @@ -49,6 +52,7 @@ kotlin { api "dev.inmo:micro_utils.coroutines:$micro_utils_version" api "io.ktor:ktor-client-core:$ktor_version" + api "com.github.matfax.klassindex:library:4.+" } } commonTest { @@ -90,3 +94,30 @@ kotlin { } } } + +dependencies { + kapt "com.github.matfax.klassindex:processor:4.+" +} + +kapt { + useBuildCache = false + arguments { + arg( + "com.github.matfax.klassindex.IndexSubclasses", + "dev.inmo.tgbotapi.types.chat.abstracts.Chat", +// "dev.inmo.tgbotapi.types.message.abstracts.Message", +// "dev.inmo.tgbotapi.types.CallbackQuery.CallbackQuery", +// "dev.inmo.tgbotapi.types.buttons.KeyboardMarkup", +// "dev.inmo.tgbotapi.types.actions.BotAction", +// "dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.InlineKeyboardButton", +// "dev.inmo.tgbotapi.types.ChatMember.abstracts.ChatMember", +// "dev.inmo.tgbotapi.types.files.abstracts.TelegramMediaFile", +// "dev.inmo.tgbotapi.types.InlineQueries.abstracts.InlineQuery", +// "dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.InlineQueryResult", +// "dev.inmo.tgbotapi.types.InlineQueries.abstracts.InputMessageContent", +// "dev.inmo.tgbotapi.types.InputMedia.InputMedia", +// "dev.inmo.tgbotapi.types.polls.Poll", +// "dev.inmo.tgbotapi.types.update.abstracts.Update" + ) + } +}