Description
Summary
Upgrading KSP from 2.3.10 to 2.3.11 breaks check in an Android-KMP library using the standalone lint plugin.
The Android host-test lint tasks consume output directories from kspAndroidHostTest without declaring a dependency on that task.
Reproducer
https://github.com/alyssoncs/KspBug
The repository contains two independent, source-identical modules. Their build files differ only by the KSP version.
./gradlew :previous:check # KSP 2.3.10: passes
./gradlew :latest:check # KSP 2.3.11: fails
Actual behavior
> Task :latest:generateAndroidHostTestLintModel FAILED
> Task :latest:lintAnalyzeAndroidHostTest FAILED
Task ':latest:lintAnalyzeAndroidHostTest' uses this output of task
':latest:kspAndroidHostTest' without declaring an explicit or implicit dependency:
latest/build/generated/ksp/android/androidHostTest/kotlin
latest/build/generated/ksp/android/androidHostTest/java
Task ':latest:generateAndroidHostTestLintModel' reports the same problem.
Expected behavior
Applying KSP must not produce an invalid Gradle task graph. check should pass as it does with KSP 2.3.10.
Environment
- KSP: 2.3.10 passes; 2.3.11 fails
- Kotlin: 2.4.10
- Android Gradle Plugin: 9.3.1
- Gradle: 9.7.0
- Plugins:
- org.jetbrains.kotlin.multiplatform
- com.android.kotlin.multiplatform.library
- com.android.lint
Additional findings
- No symbol processor dependency is required to reproduce the failure. This is intentional: androidHostTest has an empty processor classpath, which is a valid target-specific KSP configuration.
- com.android.lint is load-bearing because the Android-KMP library plugin does not add lint verification to check by itself.
- The equivalent project using normal com.android.library passes check with both KSP 2.3.10 and 2.3.11. The regression appears specific to Android-KMP host-test lint integration.
- KSP 2.3.11 changed empty-processor tasks to execute cleanup instead of being skipped as part of #3046. That change appears to expose the missing task dependency.
Description
Summary
Upgrading KSP from 2.3.10 to 2.3.11 breaks
checkin an Android-KMP library using the standalone lint plugin.The Android host-test lint tasks consume output directories from
kspAndroidHostTestwithout declaring a dependency on that task.Reproducer
https://github.com/alyssoncs/KspBug
The repository contains two independent, source-identical modules. Their build files differ only by the KSP version.