allow opt out spotless (#53)

Signed-off-by: Glease <[email protected]>

Signed-off-by: Glease <[email protected]>
This commit is contained in:
Glease authored and GitHub committed 2022-08-19 10:50:05 +02:00
1 parent ee3d3f52b4
commit 501a878b93
2 files changed
+13 -2

No files matched your search

+8 -2
View File
@@ -57,7 +57,7 @@ plugins {
id 'com.palantir.git-version' version '0.13.0' apply false
id 'de.undercouch.download' version '5.0.1'
id 'com.github.gmazzo.buildconfig' version '3.0.3' apply false
id "com.diffplug.spotless" version "6.7.2"
id 'com.diffplug.spotless' version '6.7.2' apply false
}
verifySettingsGradle()
@@ -90,7 +90,13 @@ idea {
downloadSources = true
}
}
apply from: Blowdryer.file('spotless.gradle')
boolean disableSpotless = project.hasProperty("disableSpotless") ? project.disableSpotless.toBoolean() : false
if (!disableSpotless) {
apply plugin: 'com.diffplug.spotless'
apply from: Blowdryer.file('spotless.gradle')
}
if(JavaVersion.current() != JavaVersion.VERSION_1_8) {
throw new GradleException("This project requires Java 8, but it's running on " + JavaVersion.current())
+5
View File
@@ -77,3 +77,8 @@ usesShadowedDependencies = false
# Optional parameter to prevent the source code from being published
# noPublishedSources =
# Uncomment this to disable spotless checks
# This should only be uncommented to keep it easier to sync with upstream/other forks.
# That is, if there is no other active fork/upstream, NEVER change this.
# disableSpotless = true