loom-java
Installation
SKILL.md
Java Language Expertise
Overview
Idiomatic, production-grade Java 21+ (25 is the current LTS): records, sealed hierarchies, pattern matching, streams, virtual threads, the Maven and Gradle builds, JUnit 5 and Spring Boot. Assumes the reader knows the language. The content is decision rules and the traps that survive review: == on boxed values, Collectors.toMap on a duplicate key, @Transactional on a self-call, a pinned virtual thread, a test task that runs zero JUnit 5 tests and reports success.
Tooling
Use the wrapper the repository ships (./gradlew, ./mvnw); it pins the build tool version. Keep the existing build tool: a Maven-to-Gradle migration is a separate, requested change.
| Task | Gradle | Maven |
|---|---|---|
| Full gate | ./gradlew check |
./mvnw -q verify |
| Compile main and tests | ./gradlew testClasses |
./mvnw -q test-compile |
| Unit tests | ./gradlew test |
./mvnw -q test |
| One test | ./gradlew test --tests 'com.acme.FooTest.bar' |
./mvnw test -Dtest='FooTest#bar' |
| Dependency tree | ./gradlew dependencies --configuration runtimeClasspath |
./mvnw dependency:tree |
| Why is X on the classpath | ./gradlew dependencyInsight --dependency jackson-databind |
./mvnw dependency:tree -Dincludes=com.fasterxml.jackson.core |
| Format | ./gradlew spotlessApply |
./mvnw spotless:apply |