mirror of
https://github.com/InsanusMokrassar/PlaguPoster.git
synced 2025-12-03 19:45:42 +00:00
preview version of registrar
This commit is contained in:
23
common/build.gradle
Normal file
23
common/build.gradle
Normal file
@@ -0,0 +1,23 @@
|
||||
plugins {
|
||||
id "org.jetbrains.kotlin.multiplatform"
|
||||
id "org.jetbrains.kotlin.plugin.serialization"
|
||||
id "com.android.library"
|
||||
}
|
||||
|
||||
apply from: "$mppProjectWithSerializationPresetPath"
|
||||
|
||||
kotlin {
|
||||
sourceSets {
|
||||
commonMain {
|
||||
dependencies {
|
||||
api libs.tgbotapi
|
||||
api libs.microutils.repos.common
|
||||
api libs.kslog
|
||||
}
|
||||
}
|
||||
jvmMain {
|
||||
dependencies {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
14
common/src/commonMain/kotlin/CommonMessagesCommandsFilter.kt
Normal file
14
common/src/commonMain/kotlin/CommonMessagesCommandsFilter.kt
Normal file
@@ -0,0 +1,14 @@
|
||||
package dev.inmo.plaguposter.common
|
||||
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.filters.CommonMessageFilterExcludeMediaGroups
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter
|
||||
import dev.inmo.tgbotapi.extensions.utils.textContentOrNull
|
||||
import dev.inmo.tgbotapi.types.BotCommand
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.*
|
||||
import dev.inmo.tgbotapi.types.message.textsources.BotCommandTextSource
|
||||
|
||||
val FirstSourceIsCommandsFilter = SimpleFilter<Message> {
|
||||
it is ContentMessage<*> && it.content.textContentOrNull() ?.textSources ?.firstOrNull {
|
||||
it is BotCommandTextSource
|
||||
} != null
|
||||
}
|
||||
1
common/src/commonMain/kotlin/PackageInfo.kt
Normal file
1
common/src/commonMain/kotlin/PackageInfo.kt
Normal file
@@ -0,0 +1 @@
|
||||
package dev.inmo.plaguposter.common
|
||||
1
common/src/main/AndroidManifest.xml
Normal file
1
common/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1 @@
|
||||
<manifest package="dev.inmo.plaguposter.common"/>
|
||||
Reference in New Issue
Block a user