[KLIB] Do not store Date in klib manifest
This commit is contained in:
@@ -7,6 +7,7 @@ package org.jetbrains.kotlin.konan.properties
|
||||
|
||||
import org.jetbrains.kotlin.konan.file.*
|
||||
import org.jetbrains.kotlin.konan.util.parseSpaceSeparatedArgs
|
||||
import java.io.ByteArrayOutputStream
|
||||
|
||||
typealias Properties = java.util.Properties
|
||||
|
||||
@@ -21,9 +22,13 @@ fun File.loadProperties(): Properties {
|
||||
fun loadProperties(path: String): Properties = File(path).loadProperties()
|
||||
|
||||
fun File.saveProperties(properties: Properties) {
|
||||
this.outputStream().use {
|
||||
val byteStream = ByteArrayOutputStream()
|
||||
byteStream.use {
|
||||
properties.store(it, null)
|
||||
}
|
||||
|
||||
// TODO: don't act like this
|
||||
outputStream().write(String(byteStream.toByteArray()).split("\n").drop(1).joinToString("\n").toByteArray())
|
||||
}
|
||||
|
||||
fun Properties.saveToFile(file: File) = file.saveProperties(this)
|
||||
|
||||
Reference in New Issue
Block a user