diffplug / diffplug/spotless

Support `java { toolchain { languageVersion`

Open
#724 8 comments 26 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
5.6k
Forks
559
Avg merge
1d 13h
Merged PRs (30d)
34

Description

Currently, the spotless invocation is inlined into the task execution itself.

https://github.com/diffplug/spotless/blob/main/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessTaskImpl.java#L50

Is it possible to instead run a separate main file in `JavaExec`? Gradle has introduced toolchain feature to allow build to control the Java version used for compile and execution which works very well to allow any user's Java version to run the build with a specific one. But unfortunately, this currently doesn't affect Spotless which runs in Gradle itself - for example, this means that a build must become unbuildable on Java 8 to upgrade to the latest googleJavaFormat since it requires higher Java version. It would be nice if this could be avoided.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.