Tested with 2.1.0-RC2-1.0.28 and 2.0.21-1.0.28.
Using https://github.com/eygraber/kotlin-inject/tree/ksp2, if you run ./gradlew :integration-tests:module:kspCommonMainKotlinMetadata it succeeds, and there are two generated Kotlin files under integration-tests/module/build/generated/ksp/metadata/commonMain/kotlin/me/tatarka/inject/test/module
If you then run it again, it fails with:
e: [ksp] java.io.FileNotFoundException: /home/eli/workspace/kotlin-inject/integration-tests/module/build/generated/ksp/metadata/commonMain/kotlin/me/tatarka/inject/test/module/InjectExternalParentComponent.kt (Is a directory)
and all of the files under integration-tests/module/build/generated/ksp/metadata/commonMain/kotlin/me/tatarka/inject/test/module are directories.
Running the task again after the failure succeeds.
Adding the following to integration-tests/module/build.gradle.kts prints false during the run that the task fails, indicating that it is probably something in the task that is changing the file into a directory:
tasks.all {
if(name == "kspCommonMainKotlinMetadata") {
doFirst {
println("!!!!!!!!!!!!!!!${File("/home/eli/workspace/kotlin-inject/integration-tests/module/build/generated/ksp/metadata/commonMain/kotlin/me/tatarka/inject/test/module/InjectExternalParentComponent.kt").isDirectory}")
}
}
}
Tested with 2.1.0-RC2-1.0.28 and 2.0.21-1.0.28.
Using https://github.com/eygraber/kotlin-inject/tree/ksp2, if you run
./gradlew :integration-tests:module:kspCommonMainKotlinMetadatait succeeds, and there are two generated Kotlin files underintegration-tests/module/build/generated/ksp/metadata/commonMain/kotlin/me/tatarka/inject/test/moduleIf you then run it again, it fails with:
and all of the files under
integration-tests/module/build/generated/ksp/metadata/commonMain/kotlin/me/tatarka/inject/test/moduleare directories.Running the task again after the failure succeeds.
Adding the following to
integration-tests/module/build.gradle.ktsprintsfalseduring the run that the task fails, indicating that it is probably something in the task that is changing the file into a directory:tasks.all { if(name == "kspCommonMainKotlinMetadata") { doFirst { println("!!!!!!!!!!!!!!!${File("/home/eli/workspace/kotlin-inject/integration-tests/module/build/generated/ksp/metadata/commonMain/kotlin/me/tatarka/inject/test/module/InjectExternalParentComponent.kt").isDirectory}") } } }