This repository has been archived on 2024-06-08. You can view files and clone it, but cannot push or open issues or pull requests.
tachiyomi/buildSrc/src/main/kotlin/tachiyomi.lint.gradle.kts

23 lines
540 B
Text
Raw Normal View History

import org.jlleitschuh.gradle.ktlint.KtlintExtension
import org.jlleitschuh.gradle.ktlint.KtlintPlugin
2023-01-18 22:33:56 -05:00
apply<KtlintPlugin>()
2023-01-18 22:33:56 -05:00
extensions.configure<KtlintExtension>("ktlint") {
version.set("0.50.0")
android.set(true)
enableExperimentalRules.set(true)
2023-01-18 22:33:56 -05:00
filter {
exclude("**/generated/**")
// For some reason this is needed for Kotlin MPP
exclude { tree ->
val path = tree.file.path
listOf("/generated/").any {
path.contains(it)
}
}
2023-01-18 22:33:56 -05:00
}
}