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.
-
Manual Gradle and Maven Setup -- Full
build.gradle.ktsandpom.xmlconfiguration for projects that cannot use the HKJ build plugin. Covers dependencies, annotation processors, Java preview flags, and snapshot repositories. -
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. -
Traversal Generator Plugins -- The 23 built-in generators that power
@GenerateTraversals, covering JDK collections, HKJ core types, and four third-party libraries. Includes a guide to writing your own generator for custom container types. -
Claude Code Skills -- Six bundled skills that bring contextual HKJ guidance directly into your editor. Covers Path selection, optics, effect handlers, the effects-optics bridge, Spring Boot integration, and functional core / imperative shell architecture.
Chapter Contents
- Manual Gradle and Maven Setup - Full manual build configuration
- Build Plugins - One-line project setup for Gradle and Maven
- Compile-Time Checks - Path type mismatch detection
- Diagnostics - Configuration reporting and troubleshooting
- Traversal Generator Plugins - Supported types and custom generators
- Claude Code Skills - In-editor guidance via Claude Code