Skip to content

Spotless gradle is super slow and doesn't appear to respect the -PspotlessFiles flag #557

@dphart

Description

@dphart

Using
id "com.diffplug.gradle.spotless" version "3.28.1"
I'm seeing a spotlessApply, which it thinks is cached, taking over a minute.

For this build I also ran it with the -PspotlessFiles=build.gradle flag, which I would think should cut down on the time to run but it's still taking over a minute. The only thing that changed was a single white space.

Am I missing something? Is this a typical run time? The project isn't massive.
https://scans.gradle.com/s/pcwl4s6sc7oio

spotless {
    enforceCheck = true
    java {
        target '**/*.java'
        targetExclude '**/.gradle/', '**/build/'
        removeUnusedImports()
        trimTrailingWhitespace()
        indentWithSpaces()
        endWithNewline()
        googleJavaFormat().aosp()
    }
    kotlin {
        target '**/*.kt'
        targetExclude '**/.gradle/', '**/build/'
        trimTrailingWhitespace()
        indentWithSpaces()
        endWithNewline()
        ktlint('0.36.0').userData(['disabled_rules': 'no-wildcard-imports'])
    }
    format 'xml', {
        target '**/*.xml'
        targetExclude '**/.idea/', '**/.gradle/', '**/build/'
        indentWithSpaces()
        trimTrailingWhitespace()
        endWithNewline()
    }
    format 'misc', {
        target '**/*.gradle', '**/*.md', '**/.gitignore'
        targetExclude '**/.gradle/', '**/build/'
        indentWithSpaces()
        trimTrailingWhitespace()
        endWithNewline()
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions