add TextContent

This commit is contained in:
2021-11-24 20:32:21 +06:00
parent 58b7e973be
commit 5d54fa274a
12 changed files with 85 additions and 0 deletions
client
build.gradle
src
commonMain
kotlin
dev
inmo
postssystem
client
features/content/text
client
common
build.gradle
src
commonMain
kotlin
dev
inmo
postssystem
main
server
server
build.gradle
src
main
java
dev
inmo
postssystem
server
settings.gradle

@ -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"/>

@ -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"/>

@ -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")
}
}
}
}