Skip to content

Build output directory is not excluded in Windows in Spotless 4.0.x #585

Closed
@davidburstromspotify

Description

@davidburstromspotify

Summary:
Spotless runs on build output files in Windows. The same project passes in Linux and MacOS.

Gradle version: 6.5.1-rc1

Spotless version: 4.0.0 and 4.0.1
Regression when moving from version: 3.30.0

Operating System: Windows Server 2012

Build has standard googleJavaFormat applied.

subprojects {
    apply(plugin = "com.diffplug.gradle.spotless")
    plugins.whenPluginAdded {
        if (this is JavaPlugin) {
            configure<SpotlessExtension> {
                java {
                    googleJavaFormat()
                }   
            }
        }
    }   
}

Build output:

Execution failed for task ':version:spotlessJavaCheck'. org.gradle.api.GradleException: The following files had format violations:
version\build\generated\src\constants\java\project\Version.java
Run 'gradlew.bat :version:spotlessApply' to fix these violations.
Caused by: org.gradle.api.GradleException: The following files had format violations:
     version\build\generated\src\constants\java\project\Version.java
  Run 'gradlew.bat :version:spotlessApply' to fix these violations.
    at com.diffplug.gradle.spotless.SpotlessCheck.formatViolationsFor(SpotlessCheck.java:87)
    at com.diffplug.gradle.spotless.SpotlessCheck.performAction(SpotlessCheck.java:76)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104)
    ....

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