Skip to content

ArchUnit 0.14.0

Compare
Choose a tag to compare
@codecholeric codecholeric released this 23 May 22:09

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