Skip to content

Instantly share code, notes, and snippets.

@baole
Last active July 16, 2026 04:37
Show Gist options
  • Select an option

  • Save baole/fa46ed28fc5ee921cd69a8ea5acae1ba to your computer and use it in GitHub Desktop.

Select an option

Save baole/fa46ed28fc5ee921cd69a8ea5acae1ba to your computer and use it in GitHub Desktop.
Kotlin Architecture Tests
Failure shape What it usually means First repair to try
Module :a depends on :b, which is not allowed A Gradle project dependency crossed the module policy Depend on an API module, move the contract, or remove the edge
Circular dependency detected Two or more modules now form a dependency cycle Extract a shared contract or move ownership to one side
Class ... should only depend on classes in ... A source import, signature, or referenced type crossed a package boundary Map to a boundary model, invert the dependency, or narrow the rule if the architecture changed
Generated or build files appear in violations The suite is checking code the team does not author directly Add explicit generated-code exclusions or scope the rule to production packages
A rule fails for many unrelated files The rule may be too broad or too early for enforcement Run it informationally, quarantine legacy zones, then tighten over time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment