Move yaml to multiplatform
This commit is contained in:
parent
66355793ee
commit
0e053ab78d
@ -8,10 +8,12 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v2
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 11
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v1
|
||||||
with:
|
with:
|
||||||
java-version: 11
|
java-version: 11
|
||||||
|
- name: Grant execute permission for gradlew
|
||||||
|
run: chmod +x gradlew
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: ./gradlew build
|
run: ./gradlew build
|
@ -6,6 +6,7 @@
|
|||||||
- `Path` builders
|
- `Path` builders
|
||||||
- Special ValueType for lists
|
- Special ValueType for lists
|
||||||
- `copy` method to descriptors
|
- `copy` method to descriptors
|
||||||
|
- Multiplatform yaml meta
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- `ListValue` and `DoubleArrayValue` implement `Iterable`.
|
- `ListValue` and `DoubleArrayValue` implement `Iterable`.
|
||||||
|
@ -2,7 +2,7 @@ plugins {
|
|||||||
id("ru.mipt.npm.project")
|
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 bintrayRepo by extra("dataforge")
|
||||||
val githubProject by extra("dataforge-core")
|
val githubProject by extra("dataforge-core")
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("ru.mipt.npm.mpp")
|
id("ru.mipt.npm.mpp")
|
||||||
|
id("ru.mipt.npm.native")
|
||||||
}
|
}
|
||||||
|
|
||||||
description = "YAML meta IO"
|
description = "YAML meta IO"
|
||||||
@ -9,15 +10,17 @@ repositories{
|
|||||||
}
|
}
|
||||||
|
|
||||||
kscience {
|
kscience {
|
||||||
useSerialization()
|
useSerialization{
|
||||||
|
yamlKt()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
sourceSets {
|
sourceSets {
|
||||||
jvmMain{
|
commonMain{
|
||||||
dependencies {
|
dependencies {
|
||||||
api(project(":dataforge-io"))
|
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}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ public class FrontMatterEnvelopeFormat(
|
|||||||
var offset = 0u
|
var offset = 0u
|
||||||
do {
|
do {
|
||||||
line = input.readUtf8Line() //?: error("Input does not contain front matter separator")
|
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))
|
} while (!line.startsWith(SEPARATOR))
|
||||||
|
|
||||||
val readMetaFormat =
|
val readMetaFormat =
|
||||||
@ -34,7 +34,7 @@ public class FrontMatterEnvelopeFormat(
|
|||||||
do {
|
do {
|
||||||
line = input.readUtf8Line()
|
line = input.readUtf8Line()
|
||||||
writeUtf8String(line + "\r\n")
|
writeUtf8String(line + "\r\n")
|
||||||
offset += line.toByteArray().size.toUInt()
|
offset += line.encodeToByteArray().size.toUInt()
|
||||||
} while (!line.startsWith(SEPARATOR))
|
} while (!line.startsWith(SEPARATOR))
|
||||||
}.read {
|
}.read {
|
||||||
readMetaFormat.readMeta(input)
|
readMetaFormat.readMeta(input)
|
@ -10,8 +10,8 @@ pluginManagement {
|
|||||||
maven("https://dl.bintray.com/mipt-npm/dev")
|
maven("https://dl.bintray.com/mipt-npm/dev")
|
||||||
}
|
}
|
||||||
|
|
||||||
val toolsVersion = "0.7.1"
|
val toolsVersion = "0.7.4"
|
||||||
val kotlinVersion = "1.4.21"
|
val kotlinVersion = "1.4.30-RC"
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("ru.mipt.npm.project") version toolsVersion
|
id("ru.mipt.npm.project") version toolsVersion
|
||||||
|
Loading…
Reference in New Issue
Block a user