``` tasks.withType(org.jetbrains.kotlin.gradle.tas...
# gradle
f
Copy code
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
    it.doFirst {
        it.setSource(project.file('build/generated/source/food'))
    }
}
this makes it compile correctly
e
This shouldn’t be done in a
doFirst
as it will be run after Gradle snapshots the task inputs, it may break the incrementallity of your build
f
yeah I used the other approach which is cleaner and works 🙂
👍 1