Tooling: Build-Time Safety for Higher-Kinded-J
"Make illegal states unrepresentable." -- Yaron Minsky
Every Path type in Higher-Kinded-J can only chain with the same type. Mix a MaybePath into an EitherPath chain, and you get an IllegalArgumentException at runtime. The code compiles; the tests pass (until someone hits that branch); production breaks at 2 AM.
The HKJ tooling catches these mistakes before your code ever runs. Both Gradle and Maven are supported with dedicated build plugins.
-
Build Plugins -- One-line setup for Gradle or Maven that configures dependencies, preview features, and compile-time checks automatically. Replaces multi-block boilerplate configuration with a single plugin application.
-
Compile-Time Checks -- A javac plugin that detects Path type mismatches at compile time, preventing runtime
IllegalArgumentExceptionerrors. Follows a strict no-false-positives policy. -
Diagnostics -- The
hkjDiagnosticsGradle task ormvn hkj:diagnosticsMaven goal that reports your current HKJ configuration, showing exactly which dependencies, compiler arguments, and checks are active.
Chapter Contents
- Build Plugins - One-line project setup for Gradle and Maven
- Compile-Time Checks - Path type mismatch detection
- Diagnostics - Configuration reporting and troubleshooting
Next: Build Plugins