1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 16:28:12 -07:00

Use ~/kobalt/settings.xml.

This commit is contained in:
Cedric Beust 2016-01-13 23:25:59 +04:00
parent a7d951df10
commit 3d6f0e4efb

View file

@ -17,7 +17,7 @@ import javax.xml.bind.annotation.XmlRootElement
@XmlRootElement(name = "kobalt-settings") @XmlRootElement(name = "kobalt-settings")
class KobaltSettingsXml { class KobaltSettingsXml {
@XmlElement @JvmField @XmlElement @JvmField
var localRepo: String = homeDir(KFiles.KOBALT_DOT_DIR, "repository") var localRepo: String = homeDir(KFiles.KOBALT_DIR, "repository")
} }
/** /**
@ -31,7 +31,7 @@ class KobaltSettings @Inject constructor(val xmlFile: KobaltSettingsXml) {
var localRepo = xmlFile.localRepo var localRepo = xmlFile.localRepo
companion object { companion object {
val SETTINGS_FILE_PATH = homeDir(KFiles.KOBALT_DOT_DIR, "settings.xml") val SETTINGS_FILE_PATH = homeDir(KFiles.KOBALT_DIR, "settings.xml")
fun readSettingsXml() : KobaltSettings { fun readSettingsXml() : KobaltSettings {
val file = File(KobaltSettings.SETTINGS_FILE_PATH) val file = File(KobaltSettings.SETTINGS_FILE_PATH)