1
0
mirror of https://github.com/ultrasonic/ultrasonic synced 2025-02-01 17:56:48 +01:00
tzugen 410e1df980
Upgrade detekt to v1.16.0 to get Type Resolution support
In course I had to modify the rules (many were renamed or dropped),
and create a new baseline (many new rules added errors in old files)
2021-04-23 11:26:15 +02:00

33 lines
917 B
Groovy

// Applies code quality plugins when -Pqc is passed to the gradle
def isCodeQualityEnabled = project.hasProperty('qc')
// KtLint
if (isCodeQualityEnabled) {
apply plugin: "org.jlleitschuh.gradle.ktlint"
ktlint {
version = versions.ktlint
outputToConsole = true
android = true
}
}
// Detekt
if (isCodeQualityEnabled) {
if (!project.rootProject.plugins.hasPlugin("io.gitlab.arturbosch.detekt")) {
Project rootProject = project.rootProject
rootProject.apply {
apply plugin: "io.gitlab.arturbosch.detekt"
detekt {
buildUponDefaultConfig = true
toolVersion = versions.detekt
baseline = file("${rootProject.projectDir}/detekt-baseline.xml")
config = files("${rootProject.projectDir}/detekt-config.yml")
}
}
tasks.detekt.jvmTarget = "1.8"
}
}