add TextContent
This commit is contained in:
parent
58b7e973be
commit
5d54fa274a
@ -21,6 +21,7 @@ kotlin {
|
|||||||
api project(":postssystem.features.roles.client")
|
api project(":postssystem.features.roles.client")
|
||||||
api project(":postssystem.features.roles.manager.client")
|
api project(":postssystem.features.roles.manager.client")
|
||||||
api project(":postssystem.features.content.client")
|
api project(":postssystem.features.content.client")
|
||||||
|
api project(":postssystem.features.content.text.client")
|
||||||
api "dev.inmo:micro_utils.fsm.common:$microutils_version"
|
api "dev.inmo:micro_utils.fsm.common:$microutils_version"
|
||||||
api "dev.inmo:micro_utils.fsm.repos.common:$microutils_version"
|
api "dev.inmo:micro_utils.fsm.repos.common:$microutils_version"
|
||||||
api "dev.inmo:micro_utils.crypto:$microutils_version"
|
api "dev.inmo:micro_utils.crypto:$microutils_version"
|
||||||
|
@ -28,6 +28,7 @@ import dev.inmo.postssystem.features.common.common.SerializersModuleConfigurator
|
|||||||
import dev.inmo.postssystem.features.common.common.singleWithRandomQualifier
|
import dev.inmo.postssystem.features.common.common.singleWithRandomQualifier
|
||||||
import dev.inmo.postssystem.features.content.common.ContentSerializersModuleConfigurator
|
import dev.inmo.postssystem.features.content.common.ContentSerializersModuleConfigurator
|
||||||
import dev.inmo.postssystem.features.content.common.OtherContentSerializerModuleConfigurator
|
import dev.inmo.postssystem.features.content.common.OtherContentSerializerModuleConfigurator
|
||||||
|
import dev.inmo.postssystem.features.content.content.text.common.TextContentSerializerModuleConfigurator
|
||||||
import dev.inmo.postssystem.features.status.client.StatusFeatureClient
|
import dev.inmo.postssystem.features.status.client.StatusFeatureClient
|
||||||
import io.ktor.client.HttpClient
|
import io.ktor.client.HttpClient
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
@ -67,6 +68,7 @@ fun baseKoin(
|
|||||||
modules(
|
modules(
|
||||||
module {
|
module {
|
||||||
singleWithRandomQualifier<ContentSerializersModuleConfigurator.Element> { OtherContentSerializerModuleConfigurator }
|
singleWithRandomQualifier<ContentSerializersModuleConfigurator.Element> { OtherContentSerializerModuleConfigurator }
|
||||||
|
singleWithRandomQualifier<ContentSerializersModuleConfigurator.Element> { TextContentSerializerModuleConfigurator }
|
||||||
singleWithRandomQualifier<SerializersModuleConfigurator.Element> { ContentSerializersModuleConfigurator(getAll()) }
|
singleWithRandomQualifier<SerializersModuleConfigurator.Element> { ContentSerializersModuleConfigurator(getAll()) }
|
||||||
single { SerializersModuleConfigurator(getAll()) }
|
single { SerializersModuleConfigurator(getAll()) }
|
||||||
|
|
||||||
|
18
features/content/text/client/build.gradle
Normal file
18
features/content/text/client/build.gradle
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
plugins {
|
||||||
|
id "org.jetbrains.kotlin.multiplatform"
|
||||||
|
id "org.jetbrains.kotlin.plugin.serialization"
|
||||||
|
id "com.android.library"
|
||||||
|
}
|
||||||
|
|
||||||
|
apply from: "$mppProjectWithSerializationPresetPath"
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
sourceSets {
|
||||||
|
commonMain {
|
||||||
|
dependencies {
|
||||||
|
api project(":postssystem.features.content.text.common")
|
||||||
|
api project(":postssystem.features.common.client")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
<manifest package="dev.inmo.postssystem.features.content.content.text.client"/>
|
18
features/content/text/common/build.gradle
Normal file
18
features/content/text/common/build.gradle
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
plugins {
|
||||||
|
id "org.jetbrains.kotlin.multiplatform"
|
||||||
|
id "org.jetbrains.kotlin.plugin.serialization"
|
||||||
|
id "com.android.library"
|
||||||
|
}
|
||||||
|
|
||||||
|
apply from: "$mppProjectWithSerializationPresetPath"
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
sourceSets {
|
||||||
|
commonMain {
|
||||||
|
dependencies {
|
||||||
|
api project(":postssystem.features.common.common")
|
||||||
|
api project(":postssystem.features.content.common")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
package dev.inmo.postssystem.features.content.content.text.common
|
||||||
|
|
||||||
|
import dev.inmo.postssystem.features.content.common.Content
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class TextContent(
|
||||||
|
val text: String
|
||||||
|
) : Content
|
@ -0,0 +1,11 @@
|
|||||||
|
package dev.inmo.postssystem.features.content.content.text.common
|
||||||
|
|
||||||
|
import dev.inmo.postssystem.features.content.common.Content
|
||||||
|
import dev.inmo.postssystem.features.content.common.ContentSerializersModuleConfigurator
|
||||||
|
import kotlinx.serialization.modules.PolymorphicModuleBuilder
|
||||||
|
|
||||||
|
object TextContentSerializerModuleConfigurator : ContentSerializersModuleConfigurator.Element {
|
||||||
|
override fun PolymorphicModuleBuilder<Content>.invoke() {
|
||||||
|
subclass(TextContent::class, TextContent.serializer())
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
<manifest package="dev.inmo.postssystem.features.content.content.text.common"/>
|
17
features/content/text/server/build.gradle
Normal file
17
features/content/text/server/build.gradle
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
plugins {
|
||||||
|
id "org.jetbrains.kotlin.multiplatform"
|
||||||
|
id "org.jetbrains.kotlin.plugin.serialization"
|
||||||
|
}
|
||||||
|
|
||||||
|
apply from: "$mppJavaProjectPresetPath"
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
sourceSets {
|
||||||
|
commonMain {
|
||||||
|
dependencies {
|
||||||
|
api project(":postssystem.features.content.text.common")
|
||||||
|
api project(":postssystem.features.common.server")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -19,6 +19,7 @@ dependencies {
|
|||||||
api project(":postssystem.features.roles.server")
|
api project(":postssystem.features.roles.server")
|
||||||
api project(":postssystem.features.roles.manager.server")
|
api project(":postssystem.features.roles.manager.server")
|
||||||
api project(":postssystem.features.content.server")
|
api project(":postssystem.features.content.server")
|
||||||
|
api project(":postssystem.features.content.text.server")
|
||||||
api "io.ktor:ktor-server-netty:$ktor_version"
|
api "io.ktor:ktor-server-netty:$ktor_version"
|
||||||
api "io.ktor:ktor-websockets:$ktor_version"
|
api "io.ktor:ktor-websockets:$ktor_version"
|
||||||
api "org.jetbrains.exposed:exposed-jdbc:$kotlin_exposed_version"
|
api "org.jetbrains.exposed:exposed-jdbc:$kotlin_exposed_version"
|
||||||
|
@ -28,6 +28,7 @@ import dev.inmo.micro_utils.repos.exposed.onetomany.ExposedOneToManyKeyValueRepo
|
|||||||
import dev.inmo.postssystem.features.common.common.*
|
import dev.inmo.postssystem.features.common.common.*
|
||||||
import dev.inmo.postssystem.features.content.common.ContentSerializersModuleConfigurator
|
import dev.inmo.postssystem.features.content.common.ContentSerializersModuleConfigurator
|
||||||
import dev.inmo.postssystem.features.content.common.OtherContentSerializerModuleConfigurator
|
import dev.inmo.postssystem.features.content.common.OtherContentSerializerModuleConfigurator
|
||||||
|
import dev.inmo.postssystem.features.content.content.text.common.TextContentSerializerModuleConfigurator
|
||||||
import io.ktor.application.featureOrNull
|
import io.ktor.application.featureOrNull
|
||||||
import io.ktor.application.log
|
import io.ktor.application.log
|
||||||
import io.ktor.routing.Route
|
import io.ktor.routing.Route
|
||||||
@ -72,6 +73,7 @@ fun getDIModule(
|
|||||||
|
|
||||||
return module {
|
return module {
|
||||||
singleWithRandomQualifier<ContentSerializersModuleConfigurator.Element> { OtherContentSerializerModuleConfigurator }
|
singleWithRandomQualifier<ContentSerializersModuleConfigurator.Element> { OtherContentSerializerModuleConfigurator }
|
||||||
|
singleWithRandomQualifier<ContentSerializersModuleConfigurator.Element> { TextContentSerializerModuleConfigurator }
|
||||||
singleWithRandomQualifier<SerializersModuleConfigurator.Element> { ContentSerializersModuleConfigurator(getAll()) }
|
singleWithRandomQualifier<SerializersModuleConfigurator.Element> { ContentSerializersModuleConfigurator(getAll()) }
|
||||||
single { SerializersModuleConfigurator(getAll()) }
|
single { SerializersModuleConfigurator(getAll()) }
|
||||||
|
|
||||||
|
@ -33,6 +33,10 @@ String[] includes = [
|
|||||||
":features:content:client",
|
":features:content:client",
|
||||||
":features:content:server",
|
":features:content:server",
|
||||||
|
|
||||||
|
":features:content:text:common",
|
||||||
|
":features:content:text:client",
|
||||||
|
":features:content:text:server",
|
||||||
|
|
||||||
":server",
|
":server",
|
||||||
":client",
|
":client",
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user