Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle: Unable to recognize layout.buildDirectory in build.gradle. #2114

Open
goldentrash opened this issue May 17, 2024 · 0 comments
Open
Labels

Comments

@goldentrash
Copy link

goldentrash commented May 17, 2024

Summary

When I changed the build directory, Spotless doesn't seem to recognize the changed build directory.

Detail

image

Changed the Gradle build directory from default (rootDir/build) to custom (rootDir/bug-test).

All other build output is generated from the changed build directory, but build/tmp/spotless-register-dependencies is still there.

Yes. It's not a serious error, but it's annoying, right?

Expected Behavior

A tmp/spotless-register-dependencies file should be created under the changed build directory (in this case rootDir/bug-test).

Configuration (build.gradle)

spotless {
    java {
    }
}

// It is not part of the spotless configuration, but is directly related to this issue.
layout.buildDirectory = "bug-test"

Gradle or Maven version

------------------------------------------------------------
Gradle 8.5
------------------------------------------------------------

Build time:   2023-11-29 14:08:57 UTC
Revision:     28aca86a7180baa17117e0e5ba01d8ea9feca598

Kotlin:       1.9.20
Groovy:       3.0.17
Ant:          Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM:          17.0.10 (Amazon.com Inc. 17.0.10+7-LTS)
OS:           Windows 11 10.0 amd64

Spotless version

plugins {
    id 'java'
    id "com.diffplug.spotless" version "6.25.0"
}

Related Issue

Maybe it's related to this issue. #2019

@nedtwigg nedtwigg added the bug label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants