From 5f7be6d5a5d1116cdf6be33e751ac6d2025e57a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20August=C3=BDn?= Date: Tue, 8 Jun 2021 13:58:59 +0200 Subject: [PATCH] chore: Scalafmt version extracted to constant --- .../groovy/cz/augi/gradle/scalafmt/ScalafmtFormatBase.groovy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/groovy/cz/augi/gradle/scalafmt/ScalafmtFormatBase.groovy b/src/main/groovy/cz/augi/gradle/scalafmt/ScalafmtFormatBase.groovy index 8ad3ce6..5d92f86 100644 --- a/src/main/groovy/cz/augi/gradle/scalafmt/ScalafmtFormatBase.groovy +++ b/src/main/groovy/cz/augi/gradle/scalafmt/ScalafmtFormatBase.groovy @@ -15,9 +15,11 @@ class ScalafmtFormatBase extends DefaultTask { SourceSet sourceSet @Internal PluginExtension pluginExtension + public static String SCALAFMT_VERSION = '2.7.5' + static private Scalafmt globalFormatter = Scalafmt.create(ScalafmtFormatBase.getClassLoader()) .withRespectVersion(false) - .withDefaultVersion("2.7.5") + .withDefaultVersion(SCALAFMT_VERSION) @InputFiles @PathSensitive(PathSensitivity.RELATIVE)