Nicklas Ansman
09/04/2024, 2:39 PMsourceSet.kotlin
as an input. But since KSP generates source code which is in turn added to the sourceset they do this:
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?Tapchicoma
09/05/2024, 8:11 AMNicklas Ansman
09/05/2024, 11:19 AMTapchicoma
09/05/2024, 11:23 AMTaskDependency.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.Nicklas Ansman
09/05/2024, 11:26 AM