Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport google-java-format 1.8+ #563
Conversation
|
@diffplug/spotless Just FYI, this is the first PR we have received where the formatter requires Java 11+, and there are more coming (#547). As a result, we now need our tests to run on Java 11. This PR represents the minimal effort needed to merge support for
The trickier part is that now there are some tests which you can't run on 8, because they'll break. Also, Gradle 5.0 is the oldest that can run on Java 11, so you can't run old-gradle-tests on 11. I'm very open to PRs for a more comprehensive solution, but I think it's fine to play whack-a-mole until a pattern merges. Here's the gist of the 8 / 11 test infrastructure I put in: spotless/testlib/src/main/java/com/diffplug/spotless/JreVersion.java Lines 20 to 23 in 11f58d8 |
|
Released in |
benkard commentedMay 2, 2020
In google-java-format 1.8, the signature of
RemoveUnusedImports#removeUnusedImportschanged and theRemoveUnusedImports$JavadocOnlyImportsclass was removed entirely.With this patch, GoogleJavaFormatStep detects which version of the
method is available and calls the right one.
Fixes #562.