Update ktlint version

Change-Id: Ibd8f72f0369226a115a0a8936581a1907d91fefe
dt/update-ktlint
Don Turner 2 years ago
parent 8768b20ac4
commit d6b1bd94f0

@ -87,8 +87,7 @@ fun NiaApp(
) {
val background: @Composable (@Composable () -> Unit) -> Unit =
when (appState.currentTopLevelDestination) {
TopLevelDestination.FOR_YOU -> {
content ->
TopLevelDestination.FOR_YOU -> { content ->
NiaGradientBackground(content = content)
}
else -> { content -> NiaBackground(content = content) }

@ -14,7 +14,7 @@
* limitations under the License.
*/
val ktlintVersion = "0.43.0"
val ktlintVersion = "0.46.1"
initscript {
val spotlessVersion = "6.11.0"
@ -35,7 +35,30 @@ rootProject {
kotlin {
target("**/*.kt")
targetExclude("**/build/**/*.kt")
ktlint(ktlintVersion).userData(mapOf("android" to "true"))
ktlint(ktlintVersion)
.editorConfigOverride(
mapOf(
"ktlint_code_style" to "android",
"ij_kotlin_allow_trailing_comma" to true,
// These rules were introduced in ktlint 0.46.0 and should not be
// enabled without further discussion. They are disabled for now.
// See: https://github.com/pinterest/ktlint/releases/tag/0.46.0
"disabled_rules" to
"filename," +
"annotation,annotation-spacing," +
"argument-list-wrapping," +
"double-colon-spacing," +
"enum-entry-name-case," +
"multiline-if-else," +
"no-empty-first-line-in-method-block," +
"package-name," +
"trailing-comma," +
"spacing-around-angle-brackets," +
"spacing-between-declarations-with-annotations," +
"spacing-between-declarations-with-comments," +
"unary-op-spacing"
)
)
licenseHeaderFile(rootProject.file("spotless/copyright.kt"))
}
format("kts") {

Loading…
Cancel
Save