feat: Multi-source cleanup

This commit is contained in:
Ampflower 🌺 2025-05-14 00:47:08 -07:00
parent 58e6ba1b82
commit b790d4fd1e
No known key found for this signature in database
GPG Key ID: FC0397C90D508D7F

View File

@ -145,8 +145,11 @@ tasks {
onlyIf { cleanupSource != null }
if (cleanupSource != null) {
inputs.files(cleanupSource, sourceSets.main.get().resources)
val cleanupSources = cleanupSource?.split(File.pathSeparatorChar) ?: listOf()
if (cleanupSources.isNotEmpty()) {
cleanupSources.forEach(inputs::files)
allprojects { inputs.files(sourceSets.main.get().resources) }
}
doLast {
@ -224,9 +227,12 @@ tasks {
other.hit += file
}
for (file in project.fileTree(cleanupSource)) {
logger.debug("Src {}", file)
doWork(file)
for (source in cleanupSources) {
logger.debug("SrcSrc {}", source)
for (file in project.fileTree(source)) {
logger.debug("Src {}", file)
doWork(file)
}
}
allprojects {