Skip to main content
Version: 0.12.0

configuration

root/build.gradle.kts
plugins {
id("com.rickbusarow.module-check") version "0.12.0"
}

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
unusedKotlinAndroidExtensions = false // default is false
depths = 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"
}
depths {
enabled = true // default is false
outputPath = "${project.buildDir}/reports/modulecheck/depths.txt"
}
graphs {
enabled = true // default is false
// The root directory of all generated graphs. If set, directories will be created
// for each module, mirroring the structure of the project. If this property is null,
// graphs will be created in the `build/reports/modulecheck/graphs/` relative
// directory of each project.
outputDir = "${project.buildDir}/reports/modulecheck/graphs"
}
text {
enabled = true // default is false
outputPath = "${project.buildDir}/reports/modulecheck/report.txt"
}
}
}