From 6b48a766fb7602750f812953450f7fd9e0280f50 Mon Sep 17 00:00:00 2001 From: firenoo <49818773+firenoo@users.noreply.github.com> Date: Sun, 6 Aug 2023 12:50:56 -0700 Subject: [PATCH] Respect disableSpotless property (#215) * Respect disableSpotless property Building should not depend on `spotlessCheck` if spotless is disabled, as the task is not present. * Address review --- build.gradle | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 0e5ef83..73e3d17 100644 --- a/build.gradle +++ b/build.gradle @@ -1152,7 +1152,10 @@ tasks.named("processIdeaSettings").configure { tasks.named("ideVirtualMainClasses").configure { // Make IntelliJ "Build project" build the mod jars - dependsOn("jar", "reobfJar", "spotlessCheck") + dependsOn("jar", "reobfJar") + if (!disableSpotless) { + dependsOn("spotlessCheck") + } } // workaround variable hiding in pom processing