Skip to content

Commit e19c156

Browse files
committed
Adopt latest spotless, and enable freshmark on all JRE versions thanks to #1304.
1 parent 8d99d7d commit e19c156

File tree

2 files changed

+1
-27
lines changed

2 files changed

+1
-27
lines changed

gradle/spotless-freshmark.gradle

-26
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,4 @@
11

2-
import java.util.regex.Matcher
3-
import java.util.regex.Pattern
4-
5-
6-
def thisVm() {
7-
String jre = System.getProperty("java.version")
8-
if (jre.startsWith("1.8")) {
9-
return 8
10-
} else {
11-
Matcher matcher = Pattern.compile("(\\d+)").matcher(jre)
12-
if (!matcher.find()) {
13-
throw new IllegalArgumentException("Expected " + jre + " to start with an integer")
14-
}
15-
int version = Integer.parseInt(matcher.group(1))
16-
if (version <= 8) {
17-
throw new IllegalArgumentException("Expected " + jre + " to start with an integer greater than 8")
18-
}
19-
return version
20-
}
21-
}
22-
23-
if (thisVm() >= 15) {
24-
// freshmark doesn't run on JRE 15+
25-
return
26-
}
27-
282
apply plugin: 'com.diffplug.spotless'
293

304
import com.diffplug.gradle.spotless.FreshMarkExtension

settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pluginManagement {
66
}
77

88
plugins {
9-
id 'com.diffplug.spotless' version '6.14.0' apply false
9+
id 'com.diffplug.spotless' version '6.14.1' apply false
1010
// https://plugins.gradle.org/plugin/com.gradle.plugin-publish
1111
id 'com.gradle.plugin-publish' version '1.1.0' apply false
1212
// https://github.com/gradle-nexus/publish-plugin/releases

0 commit comments

Comments
 (0)