ArchUnit v0.14.0 Release Notes

Release Date: 2020-05-23 // almost 4 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 respective package-info (see #263; thanks a lot to @rweisleder)
    • ๐Ÿ‘€ ClassFileImporter.importClasspath() now respects any ImportOptions passed via withImportOption(..) (see #296; thanks a lot to @rweisleder)
    • ๐Ÿ‘€ JavaMethod and JavaConstructor now have a heuristic line number instead of constant 0 (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 to ignoreDependency(..) analogously to layeredArchitecture() (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

    Further Acknowledgement

    • โฌ†๏ธ Thanks a lot to @aaschmid for extensive work to upgrade Gradle to the current version and to @jangalinski for the original initiative and draft (see #192, #284, #306 and #345)