добавлен binary

This commit is contained in:
alexander 2021-11-27 17:02:14 +00:00
parent ad72617cf4
commit e3b0cc1357
9 changed files with 79 additions and 1 deletions

View 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.binary.common")
api project(":postssystem.features.common.client")
}
}
}
}

View File

@ -0,0 +1 @@
<manifest package="dev.inmo.postssystem.features.content.binary.client"/>

View File

@ -0,0 +1,17 @@
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")
}
}
}
}

View File

@ -0,0 +1,9 @@
package dev.inmo.postssystem.features.content.binary.common
import dev.inmo.postssystem.features.content.common.Content
import kotlinx.serialization.Serializable
@Serializable
data class BinaryContent(
val bytes: ByteArray
) : Content

View File

@ -0,0 +1,11 @@
package dev.inmo.postssystem.features.content.binary.common
import dev.inmo.postssystem.features.content.common.Content
import dev.inmo.postssystem.features.content.common.ContentSerializersModuleConfigurator
import kotlinx.serialization.modules.PolymorphicModuleBuilder
object BinaryContentSerializerModuleConfigurator : ContentSerializersModuleConfigurator.Element {
override fun PolymorphicModuleBuilder<Content>.invoke() {
subclass(BinaryContent::class, BinaryContent.serializer())
}
}

View File

@ -0,0 +1 @@
<manifest package="dev.inmo.postssystem.features.content.binary.common"/>

View 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.binary.common")
api project(":postssystem.features.common.server")
}
}
}
}

View File

@ -14,7 +14,7 @@ kotlin_serialisation_core_version=1.3.1
koin_version=3.1.2 koin_version=3.1.2
microutils_version=0.8.5 microutils_version=0.8.5
ktor_version=1.6.6 ktor_version=1.6.5
logback_version=1.2.6 logback_version=1.2.6
uuid_version=0.3.1 uuid_version=0.3.1
klock_version=2.4.8 klock_version=2.4.8

View File

@ -37,6 +37,10 @@ String[] includes = [
":features:content:text:client", ":features:content:text:client",
":features:content:text:server", ":features:content:text:server",
":features:content:binary:common",
":features:content:binary:client",
":features:content:binary:server",
":server", ":server",
":client", ":client",
] ]