Merge pull request #3 from PostsSystem/features/add_binary_content
добавлен binary
This commit is contained in:
commit
9a7272b976
18
features/content/binary/client/build.gradle
Normal file
18
features/content/binary/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.binary.common")
|
||||
api project(":postssystem.features.common.client")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
<manifest package="dev.inmo.postssystem.features.content.binary.client"/>
|
18
features/content/binary/common/build.gradle
Normal file
18
features/content/binary/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.binary.common
|
||||
|
||||
import dev.inmo.postssystem.features.content.common.Content
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class BinaryContent(
|
||||
val bytes: ByteArray
|
||||
) : Content
|
@ -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())
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
<manifest package="dev.inmo.postssystem.features.content.binary.common"/>
|
17
features/content/binary/server/build.gradle
Normal file
17
features/content/binary/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.binary.common")
|
||||
api project(":postssystem.features.common.server")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -14,7 +14,7 @@ kotlin_serialisation_core_version=1.3.1
|
||||
|
||||
koin_version=3.1.2
|
||||
microutils_version=0.8.5
|
||||
ktor_version=1.6.6
|
||||
ktor_version=1.6.5
|
||||
logback_version=1.2.6
|
||||
uuid_version=0.3.1
|
||||
klock_version=2.4.8
|
||||
|
@ -37,6 +37,10 @@ String[] includes = [
|
||||
":features:content:text:client",
|
||||
":features:content:text:server",
|
||||
|
||||
":features:content:binary:common",
|
||||
":features:content:binary:client",
|
||||
":features:content:binary:server",
|
||||
|
||||
":server",
|
||||
":client",
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user