Hello! I have a question about `Layer rootPackage ...
# konsist
m
Hello! I have a question about
Layer rootPackage must be unique
rule. I have many feature-modules in my project, and each feature module divided to api and impl submodules. So I have layers like:
Copy code
val featureApi = Layer("FeatureApi", "com.example..feature..api.."),
val featureImpl = Layer("FeatureImpl", "com.example..feature..impl..")
I want to check, that my impl modules don't depend on other impl modules. But I can't just do like this:
Copy code
featureImpl.doesNotDependOn(featureImpl)
and even
Copy code
featureImpl.doesNotDependOn(featureImpl.copy(name = "OtherFeatureImpl"))
So, question: Does my case supported in Konsist and how can I make this check?
v
Not sure if it is possible with konsist, but it is easy with https://github.com/jraska/modules-graph-assert plus you can guard more module dependency related rules.
m
Thanks for the recommendation!