Skip to content

gradle.toml keeps generic Gradle runtime chatter that is not build signal #1178

Open

Description

@erikhuizinga

The current TOML Gradle filter keeps generic Gradle runtime chatter that is not usually useful build signal.

MWE

tmp=$(mktemp -d)
mkdir -p "$tmp/home/Library/Application Support/rtk" "$tmp/proj"

cat > "$tmp/home/Library/Application Support/rtk/filters.toml" <<'EOF'
schema_version = 1
[filters.gradle]
description = "Compact Gradle build output — strip progress, keep tasks and errors"
match_command = "^(?:\\./)?gradlew?\\b"
strip_ansi = true
strip_lines_matching = [
  "^\\s*$",
  "^> Configuring project",
  "^> Resolving dependencies",
  "^> Transform ",
  "^Download(ing)?\\s+http",
  "^\\s*<-+>\\s*$",
  "^> Task :.*UP-TO-DATE$",
  "^> Task :.*NO-SOURCE$",
  "^> Task :.*FROM-CACHE$",
  "^Starting a Gradle Daemon",
  "^Daemon will be stopped",
]
truncate_lines_at = 150
max_lines = 50
on_empty = "gradle: ok"
EOF

HOME="$tmp/home" gradle -p "$tmp/proj" init --type basic --dsl kotlin --project-name mwe --use-defaults
cd "$tmp/proj"

HOME="$tmp/home" RTK_TOML_DEBUG=1 rtk ./gradlew help
# actual includes:
# Calculating task graph as no cached configuration is available for tasks: help
# Reusing configuration cache.
# Configuration cache entry stored/reused.

Expected
Keep the task result and help text, but drop generic runtime lines such as:

  • Calculating task graph ...
  • Reusing configuration cache.
  • Configuration cache entry stored/reused.

Debug

RTK_TOML_DEBUG=1 rtk ./gradlew help
RTK_TOML_DEBUG=1 rtk ./gradlew tasks

Local workaround
Extend strip_lines_matching with patterns for generic cache/task-graph chatter.

Proposed fix in rtk

Context

Activity

  1. added
    bug
    effort-small
    filter-quality
    good first issue
    on Apr 12, 2026
  2. pszymkowiak commented on Apr 12, 2026

    @pszymkowiak
    Collaborator

    wshm · Automated triage by AI

    🔍 Automated Triage

    🐛 Category bug
    🟢 Priority low
    🎯 Confidence 82%

    Summary

    Gradle TOML filter misses configuration-cache and task-graph chatter lines; fix by adding patterns to strip_lines_matching in the existing filter definition

    This looks like a simple fix that could be auto-resolved. Repo maintainers can use /wshm fix to attempt it.

    📁 Relevant files
    • filters/gradle.toml

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

  3. JanecekPetr commented on Apr 13, 2026

    @JanecekPetr

    In JVM projects with Gradle it is fairly common to also have test logging enabled, this spits out a line for each test - the test name plus "PASSED" / "SKIPPED" / "FAILED". Would be nicve if those would be filtered, too. Probably a separate ticket, right?

    test {
        useJUnitPlatform()
        testLogging {
            events "passed", "skipped", "failed"
        }
    }
    
  4. erikhuizinga commented on Apr 13, 2026

    @erikhuizinga
    Author

    Yes, I'd treat that as a separate ticket. Logging in Gradle in general could be interfaced with. E.g. Gradle itself uses various log levels that rtk could filter on. And for specific use cases you can probably allowlist/blocklist specific regexes, like the use case you mention.

    The current issue is about filtering out even more by default.

  5. added a commit that references this issue on Jul 9, 2026
    748aba0
  6. added 2 commits that reference this issue on Jul 29, 2026
    4588485
    3ceb135
  7. added 3 commits that reference this issue on Aug 15, 2026
    216db85
    72cf4a7
    ee47f0e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:configbugeffort-smallfilter-qualitygood first issuehelp wantedpriority:low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions