Add plugable json serialization

This commit is contained in:
Alexander Nozik 2020-09-28 11:47:08 +03:00
parent 6dfd71c1fe
commit 96bfd55219
2 changed files with 12 additions and 1 deletions

View File

@ -6,7 +6,7 @@ plugins {
} }
group = "ru.mipt.npm" group = "ru.mipt.npm"
version = "0.6.1-dev-1.4.20-M1" version = "0.6.2-dev-1.4.20-M1"
repositories { repositories {
gradlePluginPortal() gradlePluginPortal()

View File

@ -8,6 +8,17 @@ class SerializationTargets(
val sourceSet: DependencySourceSet, val sourceSet: DependencySourceSet,
val configuration: DependencyConfiguration val configuration: DependencyConfiguration
) { ) {
fun Project.json(
version: String = KScienceVersions.serializationVersion
) {
useCommonDependency(
"org.jetbrains.kotlinx:kotlinx-serialization-json:$version",
dependencySourceSet = sourceSet,
dependencyConfiguration = configuration
)
}
fun Project.cbor( fun Project.cbor(
version: String = KScienceVersions.serializationVersion version: String = KScienceVersions.serializationVersion
) { ) {