mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Log.
This commit is contained in:
parent
fea075d755
commit
58a50a5e60
2 changed files with 22 additions and 1 deletions
|
@ -165,7 +165,7 @@ class KFiles {
|
|||
log(2, "Windows detected, not overwriting ${to!!}")
|
||||
} else {
|
||||
try {
|
||||
log(2, "Copy from $from!! to ${to!!}")
|
||||
log(2, "Copy from $from to ${to!!}")
|
||||
Files.copy(from, to, option)
|
||||
} catch(ex: IOException) {
|
||||
// Windows is anal about this
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
package com.beust.kobalt.misc
|
||||
|
||||
import com.google.inject.Inject
|
||||
import java.io.File
|
||||
|
||||
class KobaltWrapperProperties @Inject constructor() {
|
||||
private val WRAPPER_DIR = KFiles.KOBALT_DIR + "/wrapper"
|
||||
private val KOBALT_WRAPPER_PROPERTIES = "kobalt-wrapper.properties"
|
||||
private val PROPERTY_VERSION = "kobalt.version"
|
||||
private val PROPERTY_DOWNLOAD_URL = "kobalt.downloadUrl"
|
||||
|
||||
val file: File
|
||||
get() = File("$WRAPPER_DIR/$KOBALT_WRAPPER_PROPERTIES")
|
||||
|
||||
fun create(version: String) {
|
||||
KFiles.saveFile(file, listOf(
|
||||
"$PROPERTY_VERSION=$version",
|
||||
"$PROPERTY_DOWNLOAD_URL"
|
||||
).joinToString("\n"))
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue