Skip to content

feat: add Gradle and Maven support with Surefire parser (75-90% savings)#782

Open
romualdbassinot-efficy wants to merge 2 commits intortk-ai:developfrom
romualdbassinot-efficy:feat/gradle-maven-support
Open

feat: add Gradle and Maven support with Surefire parser (75-90% savings)#782
romualdbassinot-efficy wants to merge 2 commits intortk-ai:developfrom
romualdbassinot-efficy:feat/gradle-maven-support

Conversation

@romualdbassinot-efficy
Copy link

Summary

  • Add rtk gradle command with sub-commands: build, test, check, dependencies — filtering Gradle output to errors/failures only (75-90% savings)
  • Add rtk mvn command with sub-commands: compile, test, package, verify, install, dependency:tree — with Surefire XML parser for structured test failure output (75-90% savings)
  • Add real fixtures for both tools (build success/fail, test pass/fail)
  • Register both commands in src/main.rs Commands enum following the Go sub-enum pattern
  • Update CHANGELOG.md and src/discover/rules.rs for missed-savings detection

Test plan

  • cargo test passes
  • rtk gradle build filters Gradle build output to errors only
  • rtk gradle test shows only failed tests
  • rtk mvn compile filters Maven compile errors
  • rtk mvn test uses Surefire XML when available, falls back to text parser
  • Token savings ≥75% verified via unit tests
  • Fallback to raw command on filter failure

🤖 Generated with Claude Code

Add rtk gradle and rtk mvn commands following the Go sub-enum pattern.

- gradle_cmd.rs: test (state machine, 85-90%), build (noise filter, 75-85%),
  other (passthrough). Auto-detects ./gradlew wrapper vs gradle on PATH.
- maven_cmd.rs: test (Surefire parser, 85-90%), compile/package (70-80%),
  other (passthrough). Strips [INFO] noise, groups failures with stack context.
- 22 new unit tests (11 gradle + 11 maven), all passing with savings assertions.
- Discover rules: Gradle rewrite rule added, Maven subcmd savings updated.
- 8 real-world fixtures from E-deal (Maven) and hub-webservices (Gradle) output formats.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@CLAassistant
Copy link

CLAassistant commented Mar 22, 2026

CLA assistant check
All committers have signed the CLA.

@pszymkowiak pszymkowiak added effort-large Plusieurs jours, nouveau module enhancement New feature or request labels Mar 22, 2026
@pszymkowiak
Copy link
Collaborator

[w] wshm · Automated triage by AI

📊 Automated PR Analysis

Type feature
🟡 Risk medium

Summary

Adds Gradle and Maven command support to rtk with output filtering that achieves 75-90% token savings. Includes Gradle wrapper auto-detection, Surefire XML test parser for Maven, discovery rules for both build tools, and comprehensive test fixtures.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Analyzed automatically by wshm · This is an automated analysis, not a human review.

@romualdbassinot-efficy romualdbassinot-efficy changed the base branch from master to develop March 22, 2026 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort-large Plusieurs jours, nouveau module enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants