If i have a package structure like:
org.myapp
- common
- feature1
- feature2
- …
I would like to write an archunit test that checks if all classes inside the feature packages only reference other classes inside the same feature package or external classes or classes in the common package.
I’ve been able to implement this test using layeredArchitecture() but that forces me to actually hardcode the names of each feature branch, and i would like to make it future proof so that if one more feature package is added the test will check it as well.