Open soygabimoreno opened 1 year ago
I think it could be because the Kotlin version from the library (1.8.0) is different from the one I am currently using in my project (1.8.20). It seems it works with KAPT, but not with KSP.
I tried updating to 1.9.0 using this fork and it worked. To get the generated files I did this that I saw among the comments in the issues:
private val JvmCompilationResult.kspGeneratedSources: List<File>
get() {
val kspWorkingDir = outputDirectory.parentFile.resolve(KSP_GENERATED_FOLDER)
val kspGeneratedDir = kspWorkingDir.resolve(SOURCES_GENERATED_FOLDER)
val kotlinGeneratedDir = kspGeneratedDir.resolve(KOTLIN_GENERATED_FOLDER)
return kotlinGeneratedDir.listFilesRecursively()
}
private fun File.listFilesRecursively(): List<File> {
return listFiles()?.flatMap { file ->
if (file.isDirectory) {
file.listFilesRecursively()
} else {
listOf(file)
}
} ?: emptyList()
}
// ...
private const val KSP_GENERATED_FOLDER = "ksp"
private const val SOURCES_GENERATED_FOLDER = "sources"
private const val KOTLIN_GENERATED_FOLDER = "kotlin"
Hi! š
Not sure if this is actually an issue with the library or if I have a version conflict among dependencies in my project.
I see this error when I run my tests:
I have this configuration:
Do you now what can be the source of the error?
Could it be because the KSP version is not compatible?
Thank you so much for the help! š