From 3ec27649252c4a954b9d24aedc315e3959691233 Mon Sep 17 00:00:00 2001 From: Danno Ferrin Date: Thu, 23 May 2019 19:17:25 -0600 Subject: [PATCH] Limit spotless checks to java classes in expected java dirs (#1490) Sometimes build generated classes (like JMH) get caught up in IntelliJ's build dirs and the formatter doesn't like that. Change the spotless filter to only examine files in their expected dirs. Signed-off-by: Adrian Sutton --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 18e64d3f26..ef50519eea 100644 --- a/build.gradle +++ b/build.gradle @@ -105,7 +105,7 @@ allprojects { java { // This path needs to be relative to each project target fileTree('.') { - include '**/*.java' + include '**/src/*/java/**/*.java' exclude '**/generalstate/GeneralStateReferenceTest*.java' exclude '**/generalstate/GeneralStateRegressionReferenceTest*.java' exclude '**/blockchain/BlockchainReferenceTest*.java' @@ -128,7 +128,7 @@ allprojects { // Below this line are currently only license header tasks format 'groovy', { - target '**/*.groovy' + target '**/src/*/grovy/**/*.groovy' licenseHeaderFile "${rootDir}/gradle/spotless.java.license", 'import' }