Closed pablobaldez closed 2 years ago
if you are seeing duplicated code generated, one possibility is that you are running multiple android build variants tasks, each generates same code into its own generated folder, can you try to run only a certain build variant to see if issue resolves?
I found the problem. I replaced it:
applicationVariants.all { variant ->
variant.sourceSets.kotlin.each {
it.srcDirs += "build/generated/ksp/${variant.name}/kotlin"
}
}
by it
applicationVariants.configureEach { variant ->
kotlin.sourceSets {
getByName(name) {
kotlin.srcDir("build/generated/ksp/${variant.name}/kotlin")
}
}
}
then it stopped to generate the code for all variants at same time
It's nice you have a solution! Closing as resolved.
I'm using ksp in my android project and I'm facing an issue that impossibilitates the build All generated code is duplicated after running the command
gradlew check
in the terminalI'm using arrow and koin libraries and both generates code by ksp, but somehow the code is duplicated. Here is my
app/build.gradle