Netflix's JVM Ecosystem team built Nebula ArchRules, a Gradle plugin suite that extends ArchUnit to share and enforce architectural code rules across tens of thousands of Java repositories. The post explains why ArchUnit was chosen over AST-based tools like PMD (bytecode analysis, cross-JVM-language support, type-safe fluent API), then details how rules are authored as standalone or bundled libraries, published as separate Gradle variants, and automatically discovered and run per source set. A concrete case study shows how library authors can detect downstream usage of deprecated, experimental, or internal APIs across 5,000+ repos. Netflix is now running 358 rules detecting nearly 1 million issues, with plans to integrate auto-remediation via OpenRewrite and LLMs.

12m read timeFrom netflixtechblog.com
Post cover image
Table of contents
IntroductionCase StudyWhy ArchUnit?Rules LibrariesGet Netflix Technology Blog ’s stories in your inboxRunning RulesReportingCase Study SolutionOSS Rule LibrariesConclusion

Sort: