-
Notifications
You must be signed in to change notification settings - Fork 302
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add mandatory dependency settings to layeredArchitecture() #892
Ever since `layeredArchitecture()` supports rules on "forward dependencies" (i.e. `whereLayer(..).mayOnlyAccessLayers(..)`) there has been confusion about how to exclude false positives like `java.lang.Object`. While excluding these dependencies can be achieved by `ignoreDependency(..)` this does not seem to be an API that is easily discoverable. We now make it mandatory to choose how to treat dependencies right in the beginning. This way users will be guided to those considerations and be made aware of pitfalls as well as have an easy predefined option how to ignore false positives. This will be a breaking change, since existing `layeredArchitecture()` definitions will not compile anymore without adding the choice of how to treat dependencies.
- Loading branch information
Showing
19 changed files
with
615 additions
and
307 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
169 changes: 154 additions & 15 deletions
169
archunit/src/main/java/com/tngtech/archunit/library/Architectures.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.