Not sure if this is a detekt or ksp issue, but when I run
detektJvmMain
I get the following warning:
Copy code
Execution optimizations have been disabled for task ':samples:kotlin-inject:detektJvmMain' to ensure correctness due to the following reasons:
- Gradle detected a problem with the following location: '/home/eli/workspace/portal/samples/kotlin-inject/build/generated/ksp/jvm/jvmMain/kotlin'. Reason: Task ':samples:kotlin-inject:detektJvmMain' uses this output of task ':samples:kotlin-inject:kspKotlinJvm' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to <https://docs.gradle.org/7.4.2/userguide/validation_problems.html#implicit_dependency> for more details about this problem.
warning: classpath entry points to a non-existent location: /home/eli/workspace/portal/samples/kotlin-inject/build/generated/ksp/metadata/jvmMain/kotlin
I exclude generated ksp files from detekt using:
Copy code
tasks.withType<Detekt>().configureEach {
exclude {
"/build/generated/ksp" in it.file.absolutePath
}
}
g
gammax
05/04/2022, 5:48 PM
Did your snippet solved the problem?
e
eygraber
05/04/2022, 5:49 PM
No, I was saying that it's happening despite having that exclude already in the project.
g
gammax
05/04/2022, 5:51 PM
Yeah I believe the
exclude
has no effect because we changed how we collect the source sets.
e
eygraber
05/04/2022, 6:08 PM
Is there a way to exclude sources currently?
g
gammax
06/15/2022, 10:52 PM
You'll have to exclude using a like a package path or so. What happens is that exclused are computed for relative paths that are provided by the sourcesset from AGP