Updated to build plugin 0.1.6
This commit is contained in:
parent
62916d0c67
commit
7045f34c2c
@ -1,6 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("scientifik.mpp") version "0.1.4" apply false
|
id("scientifik.mpp") version "0.1.6" apply false
|
||||||
id("scientifik.publish") version "0.1.4" apply false
|
id("scientifik.publish") version "0.1.6" apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
val dataforgeVersion by extra("0.1.4-dev-1")
|
val dataforgeVersion by extra("0.1.4-dev-1")
|
||||||
|
@ -54,7 +54,7 @@ fun Value.toJson(descriptor: ValueDescriptor? = null): JsonElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Use theese methods to customize JSON key mapping
|
//Use these methods to customize JSON key mapping
|
||||||
private fun NameToken.toJsonKey(descriptor: ItemDescriptor?) = toString()
|
private fun NameToken.toJsonKey(descriptor: ItemDescriptor?) = toString()
|
||||||
|
|
||||||
private fun NodeDescriptor?.getDescriptor(key: String) = this?.items?.get(key)
|
private fun NodeDescriptor?.getDescriptor(key: String) = this?.items?.get(key)
|
||||||
|
@ -24,7 +24,17 @@ object NameSerializer : KSerializer<Name> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Serializer(NameToken::class)
|
@Serializer(NameToken::class)
|
||||||
object NameTokenSerializer: KSerializer<NameToken>
|
object NameTokenSerializer : KSerializer<NameToken> {
|
||||||
|
override val descriptor: SerialDescriptor = StringDescriptor.withName("NameToken")
|
||||||
|
|
||||||
|
override fun deserialize(decoder: Decoder): NameToken {
|
||||||
|
return decoder.decodeString().toName().first()!!
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun serialize(encoder: Encoder, obj: NameToken) {
|
||||||
|
encoder.encodeString(obj.toString())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Serialized for meta
|
* Serialized for meta
|
||||||
|
@ -20,7 +20,7 @@ class SimpleWorkspace(
|
|||||||
) : Workspace {
|
) : Workspace {
|
||||||
|
|
||||||
override val tasks: Map<Name, Task<*>> by lazy {
|
override val tasks: Map<Name, Task<*>> by lazy {
|
||||||
context.content<Task<*>>(Task.TYPE) + tasks.associate { it.name.toName() to it }
|
context.content<Task<*>>(Task.TYPE) + tasks.associateBy { it.name.toName() }
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
Loading…
Reference in New Issue
Block a user