add TextContent
This commit is contained in:
client
features/content/text
server
settings.gradle
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")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
9
features/content/text/common/src/commonMain/kotlin/dev/inmo/postssystem/features/content/content/text/common/TextContent.kt
Normal file
9
features/content/text/common/src/commonMain/kotlin/dev/inmo/postssystem/features/content/content/text/common/TextContent.kt
Normal file
@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user