Skip to content

Commit

Permalink
Setup detekt compose
Browse files Browse the repository at this point in the history
  • Loading branch information
kirich1409 committed May 29, 2024
1 parent 94caae7 commit 7c80847
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ allprojects.onEach { project ->

project.dependencies.add("detektPlugins", libs.detekt.formatting.get().toString())
}

if (hasPlugin(libs.plugins.compose.compiler.get().pluginId)) {
project.dependencies.add("detektPlugins", libs.detekt.rules.compose.get().toString())
}
}
}
}
5 changes: 4 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dagger = "2.51.1"
javax-inject = "1"
okhttp = "4.12.0"
coil = "2.6.0"
detekt = "1.23.3"
detekt = "1.23.6"
uiautomator = "2.3.0"
benchmarkMacroJunit4 = "1.2.4"
baselineprofile = "1.2.4"
Expand All @@ -31,6 +31,7 @@ androidSdk-target = "33"
androidSdk-min = "24"
androidSdk-compile = "34"
kotlinx-immutable = "0.3.7"
compose-rules = "0.4.3"

[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
Expand Down Expand Up @@ -91,6 +92,8 @@ androidx-uiautomator = { group = "androidx.test.uiautomator", name = "uiautomato
androidx-benchmark-macro-junit4 = { group = "androidx.benchmark", name = "benchmark-macro-junit4", version.ref = "benchmarkMacroJunit4" }
androidx-profileinstaller = { group = "androidx.profileinstaller", name = "profileinstaller", version.ref = "profileinstaller" }

detekt-rules-compose = { module = "io.nlopez.compose.rules:detekt", version.ref = "compose-rules" }

[plugins]
androidApplication = { id = "com.android.application", version.ref = "agp" }
jetbrainsKotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
Expand Down

0 comments on commit 7c80847

Please sign in to comment.