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 does not detect java sources for java-gradle-plugin #437

Open
nedtwigg opened this issue Aug 20, 2019 · 0 comments
Open

Gradle does not detect java sources for java-gradle-plugin #437

nedtwigg opened this issue Aug 20, 2019 · 0 comments
Assignees
Labels

Comments

@nedtwigg
Copy link
Member

nedtwigg commented Aug 20, 2019

With gradle 4.1 and spotless 3.6.0, the following worked. With gradle 5.6 and spotless 3.24.1, it silently fails to format sources.

apply plugin: 'java-gradle-plugin'
spotless {
  java { ... }
}

This is similar to #111 (spotless fails to detect android sources). Just like #111, the workaround is to list the target explicitly: target 'src/main/java/**/*.java', 'src/test/java/**/*.java'.

Silently not formatting is a bummer. Would perhaps be good for Spotless to report a warning if a format has been described, but the target turned out to be empty.

Project which reproduces this issue:

nedtwigg added a commit to diffplug/image-grinder that referenced this issue Aug 20, 2019
@nedtwigg nedtwigg added the bug label Aug 20, 2019
nedtwigg added a commit to diffplug/blowdryer that referenced this issue Dec 2, 2019
@nedtwigg nedtwigg self-assigned this Jan 26, 2023
nedtwigg added a commit to blacelle/spotless that referenced this issue Jan 31, 2023
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

1 participant