ArchUnit v0.14.0 Release Notes
Release Date: 2020-05-23 // almost 3 years ago-
๐ฅ Breaking Changes
- โฌ๏ธ All methods that have been deprecated up to ArchUnit
0.12.0
have been removed. It might make sense to look through your code for usage of deprecated methods and follow the advice in the Javadoc before upgrading (see #329; thanks a lot to @rweisleder for removing the old deprecations)
๐ Bug Fixes
- ๐ Fix for Android where some classes were not imported correctly when run from the command line (see #319; also thanks a lot to @rweisleder for fixing the subsequent URI problems on Windows)
- ๐ Fixed surprising behavior when using
only{Call/Access}...That()...
where the target of the call could not be resolved from the imported classes (see #340)
โจ Enhancements
Core
- ๐
JavaPackage
now offers methods to retrieve the annotations of the respectivepackage-info
(see #263; thanks a lot to @rweisleder) - ๐
ClassFileImporter.importClasspath()
now respects anyImportOptions
passed viawithImportOption(..)
(see #296; thanks a lot to @rweisleder) - ๐
JavaMethod
andJavaConstructor
now have a heuristic line number instead of constant0
(see #344; thanks a lot to @hankem)
Library
- ๐ The algorithm to detect cycles between slices has been improved from BFS to Johnson/Tarjan (see #138; thanks a lot to @torfmaster)
- Cycle detection now has a configurable limit for the max number of cycles to detect (by default 100) and a max number of violations reported (by default 20 dependencies per edge). This can be reconfigured according to the user guide (see #326)
- ๐
onionArchitecture()
now supports toignoreDependency(..)
analogously tolayeredArchitecture()
(see #318; thanks a lot to @hankem) - ๐ There now is a rule to forbid field injection in favor of constructor injection (see #288; thanks a lot to @rweisleder)
- ๐ There now is a rule to forbid dependencies on upper packages (see #151; thanks a lot to @qoomon for the initiative and POC)
JUnit
- ๐
@ArchIgnore
,@ArchTag
and@ArchTags
are now usable as meta-annotations to compose custom annotations that inherit the behavior (analogous to https://junit.org/junit5/docs/current/user-guide/#writing-tests-meta-annotations; see #282; thanks a lot to @daniel-shuy) - โฌ๏ธ Upgraded dependencies
junit-platform-*
from1.5.2
to1.6.2
Further Acknowledgement
- โฌ๏ธ All methods that have been deprecated up to ArchUnit