Skip to content

Commit b790d4f

Browse files
committed
feat: Multi-source cleanup
1 parent 58e6ba1 commit b790d4f

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

build.gradle.kts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,11 @@ tasks {
145145

146146
onlyIf { cleanupSource != null }
147147

148-
if (cleanupSource != null) {
149-
inputs.files(cleanupSource, sourceSets.main.get().resources)
148+
val cleanupSources = cleanupSource?.split(File.pathSeparatorChar) ?: listOf()
149+
150+
if (cleanupSources.isNotEmpty()) {
151+
cleanupSources.forEach(inputs::files)
152+
allprojects { inputs.files(sourceSets.main.get().resources) }
150153
}
151154

152155
doLast {
@@ -224,9 +227,12 @@ tasks {
224227
other.hit += file
225228
}
226229

227-
for (file in project.fileTree(cleanupSource)) {
228-
logger.debug("Src {}", file)
229-
doWork(file)
230+
for (source in cleanupSources) {
231+
logger.debug("SrcSrc {}", source)
232+
for (file in project.fileTree(source)) {
233+
logger.debug("Src {}", file)
234+
doWork(file)
235+
}
230236
}
231237

232238
allprojects {

0 commit comments

Comments
 (0)