diff --git a/gradle-plugin/src/main/kotlin/com/google/devtools/ksp/gradle/KspAATask.kt b/gradle-plugin/src/main/kotlin/com/google/devtools/ksp/gradle/KspAATask.kt index b9791a3041..37e96f08ed 100644 --- a/gradle-plugin/src/main/kotlin/com/google/devtools/ksp/gradle/KspAATask.kt +++ b/gradle-plugin/src/main/kotlin/com/google/devtools/ksp/gradle/KspAATask.kt @@ -174,6 +174,12 @@ interface KspAAWorkParameter : WorkParameters { abstract class KspAAWorkerAction : WorkAction { override fun execute() { val gradleCfg = parameters.config + + // Clean stale files for now. + // TODO: support incremental processing. + gradleCfg.outputBaseDir.get().deleteRecursively() + gradleCfg.cachesDir.get().deleteRecursively() + val processorClassloader = URLClassLoader( gradleCfg.processorClasspath.files.map { it.toURI().toURL() }.toTypedArray(), SymbolProcessorProvider::class.java.classLoader