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() }