From b790d4fd1eca994a3d75f879e6b4e8f13cffc4f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ampflower=20=F0=9F=8C=BA?= Date: Wed, 14 May 2025 00:47:08 -0700 Subject: [PATCH] feat: Multi-source cleanup --- build.gradle.kts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 0b65eeb..ef25122 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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 {