mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 00:38:11 -07:00
Make these lazy.
This commit is contained in:
parent
86e05dd17b
commit
930caf73bf
1 changed files with 6 additions and 4 deletions
|
@ -8,7 +8,7 @@ import java.io.InputStream
|
||||||
import java.time.Duration
|
import java.time.Duration
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
public class Kobalt {
|
class Kobalt {
|
||||||
companion object {
|
companion object {
|
||||||
// This injector will eventually be replaced with a different injector initialized with the
|
// This injector will eventually be replaced with a different injector initialized with the
|
||||||
// correct arguments (or with a TestModule) but it's necessary to give it a default value
|
// correct arguments (or with a TestModule) but it's necessary to give it a default value
|
||||||
|
@ -83,10 +83,12 @@ public class Kobalt {
|
||||||
properties.forEach { es -> System.setProperty(es.key.toString(), es.value.toString()) }
|
properties.forEach { es -> System.setProperty(es.key.toString(), es.value.toString()) }
|
||||||
}
|
}
|
||||||
|
|
||||||
val version = kobaltProperties.getProperty(PROPERTY_KOBALT_VERSION)
|
val version: String
|
||||||
|
get() = kobaltProperties.getProperty(PROPERTY_KOBALT_VERSION)
|
||||||
|
|
||||||
// Note: Duration is Java 8 only, might need an alternative if we want to support Java < 8
|
// Note: Duration is Java 8 only, might need an alternative if we want to support Java < 8
|
||||||
val versionCheckTimeout = Duration.parse(
|
val versionCheckTimeout: Duration
|
||||||
kobaltProperties.getProperty(PROPERTY_KOBALT_VERSION_CHECK_TIMEOUT) ?: "P1D")
|
get() = Duration.parse( kobaltProperties.getProperty(PROPERTY_KOBALT_VERSION_CHECK_TIMEOUT) ?: "P1D")
|
||||||
|
|
||||||
fun findPlugin(name: String) = Plugins.findPlugin(name)
|
fun findPlugin(name: String) = Plugins.findPlugin(name)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue