Skip to content

Commit

Permalink
feat: add dependency for detekt-rules-libraries and add available fie…
Browse files Browse the repository at this point in the history
…lds to detekt.yml file
  • Loading branch information
jesmrec committed Nov 20, 2024
1 parent 3b8ee2c commit b96e246
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 0 deletions.
11 changes: 11 additions & 0 deletions config/detekt/detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,17 @@ exceptions:
- 'RuntimeException'
- 'Throwable'

libraries:
active: true
ForbiddenPublicDataClass:
active: true
ignorePackages: ['*.internal', '*.internal.*']
LibraryCodeMustSpecifyReturnType:
active: true
allowOmitUnit: false
LibraryEntitiesShouldNotBePublic:
active: true

naming:
active: true
BooleanPropertyNaming:
Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ androidx-test-runner = { group = "androidx.test", name = "runner", version.ref =
androidx-test-uiautomator = { group = "androidx.test.uiautomator", name = "uiautomator", version.ref = "androidxTestUiAutomator" }
androidx-work-runtime-ktx = { group = "androidx.work", name = "work-runtime-ktx", version.ref = "androidxWork" }
coil = { group = "io.coil-kt", name = "coil", version.ref = "coil" }
detekt-libraries = { module = "io.gitlab.arturbosch.detekt:detekt-rules-libraries", version.ref = "detekt" }
dexopener = { group = "com.github.tmurakami", name = "dexopener", version.ref = "dexopener" }
disklrucache = { group = "com.jakewharton", name = "disklrucache", version.ref = "disklrucache" }
media3-exoplayer = { group = "androidx.media3", name = "media3-exoplayer", version.ref = "media3" }
Expand Down
3 changes: 3 additions & 0 deletions owncloudApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ dependencies {
debugImplementation libs.androidx.fragment.testing
debugImplementation libs.androidx.test.monitor
debugImplementation libs.stetho

// Detekt
detektPlugins libs.detekt.libraries
}

android {
Expand Down
3 changes: 3 additions & 0 deletions owncloudComLibrary/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ dependencies {
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.robolectric:robolectric:4.10'
debugImplementation 'com.facebook.stetho:stetho-okhttp3:1.6.0'

// Detekt
detektPlugins libs.detekt.libraries
}

android {
Expand Down
3 changes: 3 additions & 0 deletions owncloudData/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,7 @@ dependencies {
androidTestImplementation libs.androidx.test.runner
androidTestImplementation libs.kotlinx.coroutines.test
androidTestImplementation(libs.mockk.android) { exclude module: "objenesis" }

// Detekt
detektPlugins libs.detekt.libraries
}
3 changes: 3 additions & 0 deletions owncloudDomain/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,7 @@ dependencies {
testImplementation libs.junit4
testImplementation libs.kotlinx.coroutines.test
testImplementation libs.mockk

// Detekt
detektPlugins libs.detekt.libraries
}
3 changes: 3 additions & 0 deletions owncloudTestUtil/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,7 @@ dependencies {
implementation project(':owncloudComLibrary')
implementation libs.kotlin.stdlib
implementation libs.androidx.lifecycle.livedata.ktx

// Detekt
detektPlugins libs.detekt.libraries
}

0 comments on commit b96e246

Please sign in to comment.