Gradle does not detect java sources for `java-gradle-plugin`
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:
- works before this commit, broken after it: diffplug/image-grinder@3e73517
- workaround: diffplug/image-grinder@8b69781