You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CHANGES.md
+3
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,9 @@ This document is intended for Spotless developers.
10
10
We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`).
11
11
12
12
## [Unreleased]
13
+
### Changes
14
+
***POTENTIALLY BREAKING** Converted `googleJavaFormat` to a compile-only dependency and drop support for versions <`1.8`. ([#1630](https://github.com/diffplug/spotless/pull/1630))
15
+
* Bump default `googleJavaFormat` version `1.15.0` -> `1.16.0`. ([#1630](https://github.com/diffplug/spotless/pull/1630))
palantirJavaFormatCompileOnly 'com.palantir.javaformat:palantir-java-format:1.1.0'// this version needs to stay compilable against Java 8 for CI Job testNpm
72
73
74
+
googleJavaFormatCompileOnly 'com.google.googlejavaformat:google-java-format:1.8'// minimum required version due to api changes before then
if ((null != lower) && (fmtVersionComparator.compare(maxFormatterVersion, lower.getValue()) <= 0)) {
96
-
thrownewIllegalArgumentException(String.format("%d/%s should be lower than %d/%s", minimumJvmVersion, maxFormatterVersion, lower.getKey(), lower.getValue()));
111
+
if ((null != lower) && (fmtVersionComparator.compare(formatterVersion, lower.getValue()) <= 0)) {
112
+
thrownewIllegalArgumentException(String.format("%d/%s should be lower than %d/%s", minimumJvmVersion, formatterVersion, lower.getKey(), lower.getValue()));
if ((null != higher) && (fmtVersionComparator.compare(maxFormatterVersion, higher.getValue()) >= 0)) {
100
-
thrownewIllegalArgumentException(String.format("%d/%s should be higher than %d/%s", minimumJvmVersion, maxFormatterVersion, higher.getKey(), higher.getValue()));
115
+
if ((null != higher) && (fmtVersionComparator.compare(formatterVersion, higher.getValue()) >= 0)) {
116
+
thrownewIllegalArgumentException(String.format("%d/%s should be higher than %d/%s", minimumJvmVersion, formatterVersion, higher.getKey(), higher.getValue()));
101
117
}
102
-
returnthis;
103
118
}
104
119
105
120
/** @return Highest formatter version recommended for this JVM (null, if JVM not supported) */
if ((null != minimumFormatterVersion) && (fmtVersionComparator.compare(fmtVersion, minimumFormatterVersion) < 0)) {
155
+
returnString.format("You are running Spotless on JVM %d. This requires %s of at least %s (you are using %s).%n", Jvm.version(), fmtName, minimumFormatterVersion, fmtVersion);
if (null != recommendedFmtVersionOrNull && (fmtVersionComparator.compare(fmtVersion, recommendedFmtVersionOrNull) < 0)) {
230
+
if ((null != minimumFormatterVersion) && (fmtVersionComparator.compare(fmtVersion, minimumFormatterVersion) < 0)) {
231
+
builder.append(String.format("You are running Spotless on JVM %d. This requires %s of at least %s.%n", Jvm.version(), fmtName, minimumFormatterVersion));
232
+
builder.append(String.format("You are using %s %s.%n", fmtName, fmtVersion));
233
+
if (null != recommendedFmtVersionOrNull) {
234
+
builder.append(String.format("%s %s is the recommended version, which may have fixed this problem.%n", fmtName, recommendedFmtVersionOrNull));
builder.append(String.format("If you upgrade your JVM to %d+, then you can use %s %s, which may have fixed this problem.", higherJvmVersion, fmtName, higherFormatterVersionOrNull));
0 commit comments