Skip to content

Commit

Permalink
Refactor: dependencies to version catalog and remove unused files (op…
Browse files Browse the repository at this point in the history
  • Loading branch information
niyajali authored Aug 8, 2024
1 parent bac1001 commit 6f87da5
Show file tree
Hide file tree
Showing 199 changed files with 964 additions and 6,656 deletions.
48 changes: 28 additions & 20 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,41 @@ plugins {
alias(libs.plugins.secrets) apply false
alias(libs.plugins.room) apply false
alias(libs.plugins.kotlin.android) apply false
id("io.gitlab.arturbosch.detekt").version("1.18.1")
alias(libs.plugins.detekt)
alias(libs.plugins.detekt.compiler)
alias(libs.plugins.module.graph) apply true // Plugin applied to allow module graph generation
}

val detektProjectBaseline by tasks.registering(DetektCreateBaselineTask::class) {
description = "Overrides current baseline."
ignoreFailures.set(true)
parallel.set(true)
setSource(files(rootDir))
config.setFrom(files("$rootDir/detekt.yml"))
baseline.set(file("$rootDir/baseline.xml"))
include("**/*.kt")
include("**/*.kts")
exclude("**/resources/**")
exclude("**/build/**")
exclude("**/buildSrc/**")
exclude("**/test/**/*.kt")
val detektFormatting = libs.detekt.formatting
val twitterComposeRules = libs.twitter.detekt.compose

val reportMerge by tasks.registering(io.gitlab.arturbosch.detekt.report.ReportMergeTask::class) {
output.set(rootProject.layout.buildDirectory.file("reports/detekt/merge.html")) // or "reports/detekt/merge.sarif"
}

allprojects {
apply(plugin = "io.gitlab.arturbosch.detekt")
subprojects {
apply {
plugin("io.gitlab.arturbosch.detekt")
}

detekt {
config = files("$rootDir/config/detekt/detekt.yml")
buildUponDefaultConfig = true
parallel = true
ignoreFailures = false
config.from(rootProject.files("config/detekt/detekt.yml"))
reports.xml.required.set(true)
}

tasks.withType<io.gitlab.arturbosch.detekt.Detekt>().configureEach {
finalizedBy(reportMerge)
}

reportMerge {
input.from(tasks.withType<io.gitlab.arturbosch.detekt.Detekt>().map {
it.htmlReportFile }
)
}

dependencies {
detektPlugins(detektFormatting)
detektPlugins(twitterComposeRules)
}
}

Expand Down
Loading

0 comments on commit 6f87da5

Please sign in to comment.