1 package net.pterodactylus.sone.main
3 import com.fasterxml.jackson.databind.ObjectMapper
4 import com.fasterxml.jackson.dataformat.yaml.YAMLFactory
7 fun parseVersion(file: String = "/version.yaml"): Version? =
8 Version::class.java.getResourceAsStream(file)?.use {
9 objectMapper.readValue(it, Version::class.java)
12 val parsedVersion by lazy { parseVersion() }
14 private val objectMapper = ObjectMapper(YAMLFactory())
17 data class Version(val id: String, val nice: String)