Move yaml to multiplatform

This commit is contained in:
Alexander Nozik 2021-01-30 19:49:28 +03:00
parent 66355793ee
commit 0e053ab78d
8 changed files with 15 additions and 9 deletions

View File

@ -8,10 +8,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build

View File

@ -6,6 +6,7 @@
- `Path` builders
- Special ValueType for lists
- `copy` method to descriptors
- Multiplatform yaml meta
### Changed
- `ListValue` and `DoubleArrayValue` implement `Iterable`.

View File

@ -2,7 +2,7 @@ plugins {
id("ru.mipt.npm.project")
}
val dataforgeVersion by extra("0.3.0-dev-2")
val dataforgeVersion by extra("0.3.0-dev-3")
val bintrayRepo by extra("dataforge")
val githubProject by extra("dataforge-core")

View File

@ -1,5 +1,6 @@
plugins {
id("ru.mipt.npm.mpp")
id("ru.mipt.npm.native")
}
description = "YAML meta IO"
@ -9,15 +10,17 @@ repositories{
}
kscience {
useSerialization()
useSerialization{
yamlKt()
}
}
kotlin {
sourceSets {
jvmMain{
commonMain{
dependencies {
api(project(":dataforge-io"))
api("net.mamoe.yamlkt:yamlkt:${ru.mipt.npm.gradle.KScienceVersions.Serialization.yamlKtVersion}")
// api("net.mamoe.yamlkt:yamlkt:${ru.mipt.npm.gradle.KScienceVersions.Serialization.yamlKtVersion}")
}
}
}

View File

@ -22,7 +22,7 @@ public class FrontMatterEnvelopeFormat(
var offset = 0u
do {
line = input.readUtf8Line() //?: error("Input does not contain front matter separator")
offset += line.toByteArray().size.toUInt()
offset += line.encodeToByteArray().size.toUInt()
} while (!line.startsWith(SEPARATOR))
val readMetaFormat =
@ -34,7 +34,7 @@ public class FrontMatterEnvelopeFormat(
do {
line = input.readUtf8Line()
writeUtf8String(line + "\r\n")
offset += line.toByteArray().size.toUInt()
offset += line.encodeToByteArray().size.toUInt()
} while (!line.startsWith(SEPARATOR))
}.read {
readMetaFormat.readMeta(input)

View File

@ -10,8 +10,8 @@ pluginManagement {
maven("https://dl.bintray.com/mipt-npm/dev")
}
val toolsVersion = "0.7.1"
val kotlinVersion = "1.4.21"
val toolsVersion = "0.7.4"
val kotlinVersion = "1.4.30-RC"
plugins {
id("ru.mipt.npm.project") version toolsVersion