Merge pull request #3 from PostsSystem/features/add_binary_content

добавлен binary
This commit is contained in:
InsanusMokrassar 2021-11-28 00:09:39 +06:00 committed by GitHub
commit 9a7272b976
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 80 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,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")
}
}
}
}

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",
] ]