1
0
mirror of https://github.com/vector-im/riotX-android synced 2025-10-06 00:02:48 +02:00

Set up detekt gradle plugin

This commit is contained in:
Benoit Marty
2022-05-12 16:41:36 +02:00
parent f54c865cf4
commit c02fb87bc9
3 changed files with 17 additions and 1 deletions

View File

@@ -35,9 +35,11 @@ buildscript {
}
}
// ktlint Plugin
plugins {
// ktlint Plugin
id "org.jlleitschuh.gradle.ktlint" version "10.3.0"
// Detekt
id "io.gitlab.arturbosch.detekt" version "1.20.0"
}
// https://github.com/jeremylong/DependencyCheck
@@ -52,6 +54,7 @@ dependencyCheck {
allprojects {
apply plugin: "org.jlleitschuh.gradle.ktlint"
apply plugin: "io.gitlab.arturbosch.detekt"
repositories {
// Do not use `mavenCentral()`, it prevents Dependabot from working properly
@@ -140,6 +143,17 @@ allprojects {
"experimental:kdoc-wrapping",
]
}
detekt {
// preconfigure defaults
buildUponDefaultConfig = true
// activate all available (even unstable) rules.
allRules = false
// point to your custom config defining rules to run, overwriting default behavior
config = files("$rootDir/tools/detekt/detekt.yml")
// a way of suppressing issues before introducing detekt
baseline = file("$rootDir/tools/detekt/baseline.xml")
}
}
task clean(type: Delete) {