In an Android multimodule project, is there a way ...
# konsist
j
In an Android multimodule project, is there a way to exclude a given module from Konsist rules being applied to it? In our codebase, we have a module with spaghetti code that is causing Konsist tests to fail.
i
s
To achieve something similar in our project, we take advantage of the
slice
function:
Copy code
val productionCode
        get() = Konsist.scopeFromProduction().ignoreDependencies()

private fun KoScope.ignoreDependencies() =
        this.slice { !(it.path.contains("/node_modules/") || it.path.contains("/Dependencies/")) }