The markGeneratedEqualsHashCode task was modifying class files in-place
in build/classes/java/main, and the jar task depended on it, causing
the @Generated-annotated bytecode to flow into published artifacts.
Fix: copy classes to a separate build/classes-jacoco/ directory before
modifying them, prepend that directory to the test classpath (so Jacoco
CRC64 checksums match), and point jacocoTestReport at the modified copy.
The jar/shadowJar tasks now only see the pristine compiler output.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
Test plan
🤖 Generated with Claude Code