ArchUnit v0.9.0 Release Notes
Release Date: 2018-08-19 // over 5 years ago-
Important
๐ The Maven coordinates for
com.tngtech.archunit:archunit-junit
have changed, since there is now support for JUnit 4 and JUnit 5. The new coordinates for the equivalent artifact are nowcom.tngtech.archunit:archunit-junit4:0.9.0
โจ Enhancements
Core
๐
archunit-ignore-patterns.txt
can now contain comments (see #88; many thanks to @bedla)a
JavaClass
'directDependenciesFromSelf
anddirectDependenciesToSelf
now contain further dependencies. This affects many rules as well, likelayeredArchitecture()
which might now detect more violations than before. In particular dependencies now contain dependencies from- fields of a certain type
- method/constructor parameters of a certain type
- method return types
๐ (see #92 and #96; many thanks to @msherman32)
๐ the plugin mechanism activating Java >= 9 support now supports EA versions (see #93; many thanks to @jqno)
Lang
- ๐ the rule API now supports a concise way to assert properties of a single class (see #60; many thanks to @msherman32)
- ๐ the rule API can now assert that classes
haveOnlyFinalFields()
(see #86; many thanks to @bgalek) - ๐ the rule API now allows to assert that there are at least / at most / exactly
x
classes matched by a rule (see #83; many thanks to @bedla) - rules can now be derived from PlantUML component diagrams (compare the User Guide; see #4; many thanks to @msherman32)
- ๐ the rule API now allows to check more general for dependencies instead of just accesses (like interfaces, field types, method parameters, ...) (see #69)
- ๐ the rule API now includes several methods to restrict what classes should "only" do, i.e.
classes().should().onlyDependOnClassesThat()...
oronlyCallMethodsThat(..)
, etc. (see #84)
JUnit
- ArchUnit now offers extended JUnit 5 support (compare the User Guide; see #34)
Kotlin
- rule suits with JUnit 4 / JUnit 5 can now be written in a concise way and source locations are reported correctly (compare the User Guide; see #77)