configuration
- Kotlin
- Groovy
root/build.gradle.kts
plugins {
id("com.rickbusarow.module-check") version "0.11.3"
}
moduleCheck {
deleteUnused = true // default is false
checks {
overShotDependency = true // default is true
redundantDependency = false // default is false
unusedDependency = true // default is true
mustBeApi = true // default is true
inheritedDependency = true // default is true
sortDependencies = false // default is false
sortPlugins = false // default is false
unusedKapt = true // default is true
anvilFactoryGeneration = true // default is true
disableAndroidResources = false // default is false
disableViewBinding = false // default is false
}
// allow these modules to be declared as dependency anywhere,
// regardless of whether they're used
ignoreUnusedFinding = setOf(":test:core-jvm", ":test:core-android")
// do not check the dependencies of these modules.
// in this case, :app could declare any module it wants without issue
doNotCheck = setOf(":app")
additionalKaptMatchers = listOf(
modulecheck.api.KaptMatcher(
name = "MyProcessor",
processor = "my-project.codegen:processor",
annotationImports = listOf(
"myproject\\.\\*",
"myproject\\.MyInject",
"myproject\\.MyInject\\.Factory",
"myproject\\.MyInjectParam",
"myproject\\.MyInjectModule"
)
)
)
reports {
checkstyle {
enabled = true // default is false
outputPath = "${project.buildDir}/reports/modulecheck/checkstyle.xml"
}
text {
enabled = true // default is false
outputPath = "${project.buildDir}/reports/modulecheck/report.txt"
}
}
}
root/build.gradle
plugins {
id 'com.rickbusarow.module-check' version '0.11.3'
}
moduleCheck {
deleteUnused = true // default is false
checks {
overShotDependency = true // default is true
redundantDependency = false // default is false
unusedDependency = true // default is true
mustBeApi = true // default is true
inheritedDependency = true // default is true
sortDependencies = false // default is false
sortPlugins = false // default is false
unusedKapt = true // default is true
anvilFactoryGeneration = true // default is true
disableAndroidResources = false // default is false
disableViewBinding = false // default is false
}
// allow these modules to be declared as dependency anywhere,
// regardless of whether they're used
ignoreUnusedFinding = [':test:core-jvm', ':test:core-android']
// do not check the dependencies of these modules.
// in this case, :app could declare any module it wants without issue
doNotCheck = [':app']
additionalKaptMatchers = [
new modulecheck.api.KaptMatcher(
'MyProcessor',
'my-project.codegen:processor',
[
"myproject\\.\\*",
"myproject\\.MyInject",
"myproject\\.MyInject\\.Factory",
"myproject\\.MyInjectParam",
"myproject\\.MyInjectModule"
]
)
]
reports {
checkstyle {
it.enabled = true // default is false
it.outputPath = "${project.buildDir}/reports/modulecheck/checkstyle.xml"
}
text {
it.enabled = true // default is false
it.outputPath = "${project.buildDir}/reports/modulecheck/report.txt"
}
}
}