From bcee64c103aea2a0f5fe0e8ad8a5ee256b8c9532 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Tue, 18 Aug 2020 20:44:31 +0600 Subject: [PATCH] try to fix --- TelegramBotAPI-all/build.gradle | 2 +- TelegramBotAPI-extensions-api/build.gradle | 2 +- TelegramBotAPI-extensions-utils/build.gradle | 2 +- TelegramBotAPI/build.gradle | 2 +- .../insanusmokrassar/TelegramBotAPI/types/BotCommand.kt | 4 +++- docs/build.gradle | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/TelegramBotAPI-all/build.gradle b/TelegramBotAPI-all/build.gradle index a24eceae69..da9fdb7d1d 100644 --- a/TelegramBotAPI-all/build.gradle +++ b/TelegramBotAPI-all/build.gradle @@ -32,7 +32,7 @@ repositories { kotlin { jvm() js { - browser() + browser { dceTask { keep "${project.name}.$library_group" } } nodejs() } diff --git a/TelegramBotAPI-extensions-api/build.gradle b/TelegramBotAPI-extensions-api/build.gradle index 3334bf03aa..b472b426b5 100644 --- a/TelegramBotAPI-extensions-api/build.gradle +++ b/TelegramBotAPI-extensions-api/build.gradle @@ -32,7 +32,7 @@ repositories { kotlin { jvm() js { - browser() + browser { dceTask { keep "${project.name}.$library_group" } } nodejs() } diff --git a/TelegramBotAPI-extensions-utils/build.gradle b/TelegramBotAPI-extensions-utils/build.gradle index 3334bf03aa..b472b426b5 100644 --- a/TelegramBotAPI-extensions-utils/build.gradle +++ b/TelegramBotAPI-extensions-utils/build.gradle @@ -32,7 +32,7 @@ repositories { kotlin { jvm() js { - browser() + browser { dceTask { keep "${project.name}.$library_group" } } nodejs() } diff --git a/TelegramBotAPI/build.gradle b/TelegramBotAPI/build.gradle index dc6d9b7f4b..62c7070d6b 100644 --- a/TelegramBotAPI/build.gradle +++ b/TelegramBotAPI/build.gradle @@ -32,7 +32,7 @@ repositories { kotlin { jvm() js { - browser() + browser { dceTask { keep "${project.name}.$library_group" } } nodejs() } diff --git a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/BotCommand.kt b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/BotCommand.kt index 3ac9d3470d..fb95cc9853 100644 --- a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/BotCommand.kt +++ b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/BotCommand.kt @@ -4,7 +4,9 @@ import com.github.insanusmokrassar.TelegramBotAPI.utils.throwRangeError import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable -val BotCommandNameRegex = Regex("^[a-z_0-9]{${botCommandLengthLimit.first},${botCommandLengthLimit.last}}$") +val BotCommandNameRegex by lazy { + Regex("^[a-z_0-9]{${botCommandLengthLimit.first},${botCommandLengthLimit.last}}$") +} @Serializable data class BotCommand( diff --git a/docs/build.gradle b/docs/build.gradle index 5131e7e4b3..a73a3f0fdd 100644 --- a/docs/build.gradle +++ b/docs/build.gradle @@ -27,7 +27,7 @@ repositories { kotlin { jvm() js { - browser() + browser { dceTask { keep "${project.name}.$library_group" } } nodejs() }