mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-04 03:14:40 -05:00
Switch to a new Ktlint Formatter (#705)
* Switch to new Ktlint plugin * Add ktlintCheck to PR builds * Run formatter * Put ktlint version in libs toml * Fix lint * Use Zip4Java from libs.toml
This commit is contained in:
@@ -13,7 +13,6 @@ class ApplicationInfoConfigModule(getConfig: () -> Config) : ConfigModule(getCon
|
||||
val debug: Boolean by getConfig()
|
||||
|
||||
companion object {
|
||||
fun register(config: Config) =
|
||||
ApplicationInfoConfigModule { config.getConfig("android.app") }
|
||||
fun register(config: Config) = ApplicationInfoConfigModule { config.getConfig("android.app") }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ class FilesConfigModule(getConfig: () -> Config) : ConfigModule(getConfig) {
|
||||
val packageDir: String by getConfig()
|
||||
|
||||
companion object {
|
||||
fun register(config: Config) =
|
||||
FilesConfigModule { config.getConfig("android.files") }
|
||||
fun register(config: Config) = FilesConfigModule { config.getConfig("android.files") }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,13 +10,16 @@ class SystemConfigModule(val getConfig: () -> Config) : ConfigModule(getConfig)
|
||||
val propertyPrefix = "properties."
|
||||
|
||||
fun getStringProperty(property: String) = getConfig().getString("$propertyPrefix$property")!!
|
||||
|
||||
fun getIntProperty(property: String) = getConfig().getInt("$propertyPrefix$property")
|
||||
|
||||
fun getLongProperty(property: String) = getConfig().getLong("$propertyPrefix$property")
|
||||
|
||||
fun getBooleanProperty(property: String) = getConfig().getBoolean("$propertyPrefix$property")
|
||||
|
||||
fun hasProperty(property: String) = getConfig().hasPath("$propertyPrefix$property")
|
||||
|
||||
companion object {
|
||||
fun register(config: Config) =
|
||||
SystemConfigModule { config.getConfig("android.system") }
|
||||
fun register(config: Config) = SystemConfigModule { config.getConfig("android.system") }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user