palantir / gradle-baseline

A set of Gradle plugins that configure default code quality tools for developers.
Apache License 2.0
299 stars 135 forks source link

Old version of spotless java creating compilation issues #2828

Open daberkow opened 1 month ago

daberkow commented 1 month ago

What happened?

With https://github.com/palantir/gradle-baseline/blob/5e773859eee2463ca8b262f8730efff13cdb32db/versions.props#L49 we have spotless java kept at 6.6.0, https://github.com/diffplug/spotless/issues/834#issuecomment-1827659711 says we need to bump to at least 6.7.1 to avoid a bug I am seeing where the following stack trace occurs (I copied the stack trace from the link before).

Step 'removeUnusedImports' found problem in 'functional-tests/src/main/java/com/comp/atlas/oyo/upgrade/configuration/TesterConfiguration.java':

null

java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)

What did you want to happen?

I see a note that "Newer spotless versions have issues resolving dependencies at configuration time", but latest is 6.24.0, and we are on a build from 2022.