Skip to content

Commit

Permalink
Added detekt gradle plugin with default configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
tonelli-m committed Jul 16, 2024
1 parent 0afe3b7 commit 1a41a0a
Show file tree
Hide file tree
Showing 2 changed files with 808 additions and 0 deletions.
34 changes: 34 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,41 @@
import io.gitlab.arturbosch.detekt.Detekt
import io.gitlab.arturbosch.detekt.DetektCreateBaselineTask

plugins {
kotlin("android") version libs.versions.kotlin.get() apply false
kotlin("multiplatform") version libs.versions.kotlin.get() apply false
id("com.android.application") version libs.versions.agp.get() apply false
id("org.jetbrains.compose") version libs.versions.compose.plugin.get() apply false
id("com.google.devtools.ksp") version libs.versions.ksp.get() apply false
id("io.gitlab.arturbosch.detekt") version "1.23.6"
}

repositories {
mavenCentral()
}


allprojects {

apply(plugin = "io.gitlab.arturbosch.detekt")

detekt {
buildUponDefaultConfig = true
allRules = true
config.setFrom("$projectDir/../config/detekt.yml")
}

tasks.withType<Detekt>().configureEach {
reports {
html.required.set(true)
}
}

// Kotlin DSL
tasks.withType<Detekt>().configureEach {
jvmTarget = "1.8"
}
tasks.withType<DetektCreateBaselineTask>().configureEach {
jvmTarget = "1.8"
}
}
Loading

0 comments on commit 1a41a0a

Please sign in to comment.