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:
Mitchell Syer
2023-10-06 23:38:39 -04:00
committed by GitHub
parent 3cd3cb0186
commit 849acfca3d
277 changed files with 6709 additions and 5090 deletions

View File

@@ -46,7 +46,7 @@ object Source {
catalogueSource.supportsLatest,
catalogueSource is ConfigurableSource,
it[SourceTable.isNsfw],
catalogueSource.toString()
catalogueSource.toString(),
)
}
}
@@ -63,12 +63,12 @@ object Source {
source[SourceTable.name],
source[SourceTable.lang],
getExtensionIconUrl(
extension[ExtensionTable.apkName]
extension[ExtensionTable.apkName],
),
catalogueSource.supportsLatest,
catalogueSource is ConfigurableSource,
source[SourceTable.isNsfw],
catalogueSource.toString()
catalogueSource.toString(),
)
}
}
@@ -85,7 +85,7 @@ object Source {
*/
data class PreferenceObject(
val type: String,
val props: Any
val props: Any,
)
var preferenceScreenMap: MutableMap<Long, PreferenceScreen> = mutableMapOf()
@@ -119,7 +119,7 @@ object Source {
data class SourcePreferenceChange(
val position: Int,
val value: String
val value: String,
)
private val jsonMapper by DI.global.instance<JsonMapper>()
@@ -137,7 +137,7 @@ object Source {
"Set<String>" -> jsonMapper.fromJsonString(value, List::class.java as Class<List<String>>).toSet()
else -> throw RuntimeException("Unsupported type conversion")
}
}
},
) {
val screen = preferenceScreenMap[sourceId]!!
val pref = screen.preferences[position]