mirror of
https://github.com/ultrasonic/ultrasonic
synced 2024-12-12 08:46:51 +01:00
c917bcb1a6
Also updated ktlint-gradle to 2.3.0 version. Added ktlint reports to circle CI. Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
30 lines
764 B
Groovy
30 lines
764 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
|
|
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 {
|
|
version = versions.detekt
|
|
profile("main") {
|
|
config = "${rootProject.projectDir}/detekt-config.yml"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|