@@ -5,7 +5,7 @@ def configPath = rootProject.hasProperty('sharedConfigDirectory') ? sharedConfig
55// This is necessary for some projects that set a special groovy target which can't coexist with excludeJava
66boolean groovySkipJavaExclude = project. hasProperty(' groovySkipJavaExclude' ) ? groovySkipJavaExclude : false
77
8- def buildDirectoryFiles = project. layout. buildDirectory. asFileTree
8+ def buildDirectory = project. layout. buildDirectory
99
1010// Temporary exclusions as conventions are properly setup for these projects.
1111def javaGradleApplyExceptions = [
@@ -50,7 +50,7 @@ spotless {
5050 // set explicit target to workaround https://github.com/diffplug/spotless/issues/1163
5151 target ' src/**/*.java'
5252 // ignore embedded test projects and everything in build dir, e.g. generated sources
53- targetExclude(' src/test/resources/**' , buildDirectoryFiles )
53+ targetExclude(' src/test/resources/**' , buildDirectory )
5454 removeUnusedImports()
5555 forbidWildcardImports()
5656 tableTestFormatter(libs. versions. tabletest. formatter. get())
@@ -93,15 +93,15 @@ spotless {
9393 // the Groovy Eclipse formatter extends the Java Eclipse formatter,
9494 // so it formats Java files by default (unless `excludeJava` is used).
9595 }
96- targetExclude(buildDirectoryFiles )
96+ targetExclude(buildDirectory )
9797 greclipse(libs. versions. greclipse. get()). configFile(configPath + ' /enforcement/spotless-groovy.properties' )
9898 }
9999 }
100100
101101 project. pluginManager. withPlugin(' scala' ) {
102102 scala {
103103 toggleOffOn()
104- targetExclude(buildDirectoryFiles )
104+ targetExclude(buildDirectory )
105105 scalafmt(libs. versions. scalafmt. get()). configFile(configPath + ' /enforcement/spotless-scalafmt.conf' )
106106 }
107107 }
@@ -124,7 +124,7 @@ spotless {
124124 project. pluginManager. withPlugin(' kotlin' ) {
125125 kotlin {
126126 toggleOffOn()
127- targetExclude(buildDirectoryFiles )
127+ targetExclude(buildDirectory )
128128 ktlint(libs. versions. ktlint. get()). editorConfigOverride([
129129 // Disable trailing comma rules to minimize diff.
130130 ' ktlint_standard_trailing-comma-on-call-site' : ' disabled' ,
0 commit comments