Skip to content

Commit

Permalink
Merge branch 'clean-up-detekt-baseline-from-generated-classes-droid-1…
Browse files Browse the repository at this point in the history
…042'
  • Loading branch information
albin-mullvad committed Jun 10, 2024
2 parents 5f1dcf7 + 596c385 commit af3a990
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 587 deletions.
13 changes: 11 additions & 2 deletions android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
import io.gitlab.arturbosch.detekt.Detekt
import io.gitlab.arturbosch.detekt.DetektCreateBaselineTask

plugins {
id(Dependencies.Plugin.dependencyCheckId) version Versions.Plugin.dependencyCheck apply false
Expand Down Expand Up @@ -34,7 +35,10 @@ val baselineFile = file("$rootDir/config/baseline.xml")
val configFile = files("$rootDir/config/detekt.yml")

val projectSource = file(projectDir)
val buildFiles = "**/build/**"
val detektExcludedPaths = listOf(
"**/build/**",
"**/mullvad_daemon/management_interface/**",
)

detekt {
buildUponDefaultConfig = true
Expand All @@ -49,7 +53,12 @@ detekt {

tasks.withType<Detekt>().configureEach {
// Ignore generated files from the build directory, e.g files created by ksp.
exclude(buildFiles)
exclude(detektExcludedPaths)
}

tasks.withType<DetektCreateBaselineTask>().configureEach {
// Ignore generated files from the build directory, e.g files created by ksp.
exclude(detektExcludedPaths)
}

allprojects {
Expand Down
Loading

0 comments on commit af3a990

Please sign in to comment.