I'm on a mission to fix as many project isolation ...
# configuration-cache
n
I'm on a mission to fix as many project isolation issues as I can in third party projects. I fixed the trivial ones in KSP but there are some that are hard to fix. KSP needs to process the same source files as the normal compile task so it uses
sourceSet.kotlin
as an input. But since KSP generates source code which is in turn added to the sourceset they do this:
Copy code
sourceSet.kotlin.nonSelfDeps(kspTaskName)

internal fun FileCollection.nonSelfDeps(selfTaskName: String): List<Task> =
    buildDependencies.getDependencies(null).filterNot {
        it.name == selfTaskName
    }
Calling
TaskDependency.getDependencies
is a PI violation. Is there another way to achieve the same result?
👍 1
t
for this problem - part of the long term solution is on Kotlin plugin as well 😿 (issue)
n
Got it, so this is a Kotlin problem, not a Gradle problem?
t
for
TaskDependency.getDependencies
problem - no as it is Gradle API. For thing that KSP needs to filter own task - yes, Kotlin problem as it does not provide required APIs in Kotlin Gradle Plugin.
n
Oh I see what you mean. I thought you implied that Kotlin will provide a better API