From e19c1562cc6ca96300ecd9e5b4aac100cccf5184 Mon Sep 17 00:00:00 2001 From: Ned Twigg Date: Sun, 5 Feb 2023 09:02:28 -0800 Subject: [PATCH] Adopt latest spotless, and enable freshmark on all JRE versions thanks to #1304. --- gradle/spotless-freshmark.gradle | 26 -------------------------- settings.gradle | 2 +- 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/gradle/spotless-freshmark.gradle b/gradle/spotless-freshmark.gradle index 30c5ab6306..2a79ab01ba 100644 --- a/gradle/spotless-freshmark.gradle +++ b/gradle/spotless-freshmark.gradle @@ -1,30 +1,4 @@ -import java.util.regex.Matcher -import java.util.regex.Pattern - - -def thisVm() { - String jre = System.getProperty("java.version") - if (jre.startsWith("1.8")) { - return 8 - } else { - Matcher matcher = Pattern.compile("(\\d+)").matcher(jre) - if (!matcher.find()) { - throw new IllegalArgumentException("Expected " + jre + " to start with an integer") - } - int version = Integer.parseInt(matcher.group(1)) - if (version <= 8) { - throw new IllegalArgumentException("Expected " + jre + " to start with an integer greater than 8") - } - return version - } -} - -if (thisVm() >= 15) { - // freshmark doesn't run on JRE 15+ - return -} - apply plugin: 'com.diffplug.spotless' import com.diffplug.gradle.spotless.FreshMarkExtension diff --git a/settings.gradle b/settings.gradle index 9573775884..077fdd9336 100644 --- a/settings.gradle +++ b/settings.gradle @@ -6,7 +6,7 @@ pluginManagement { } plugins { - id 'com.diffplug.spotless' version '6.14.0' apply false + id 'com.diffplug.spotless' version '6.14.1' apply false // https://plugins.gradle.org/plugin/com.gradle.plugin-publish id 'com.gradle.plugin-publish' version '1.1.0' apply false // https://github.com/gradle-nexus/publish-plugin/releases