andylamax
08/08/2022, 2:06 AMtargets.configureEach {
compilations.all {
compileKotlinTask.dependsOn("generateCode")
}
}
Is there another better way?ephemient
08/08/2022, 2:24 AMVampire
08/08/2022, 7:30 AMandylamax
08/08/2022, 3:47 PMcompileKotlinJvm
then generateCode
will be called as a dependency. Just adding the output to the sourceSet works if the code is already generated, and it doesn't if the code is not generated at all in the first placeephemient
08/08/2022, 3:49 PMtask.outputDir
not file(dir)
), the task dependencies are trackedandylamax
08/08/2022, 3:54 PMtask.outputDir
I had it with kotlin.srcDirs
Vampire
08/08/2022, 3:56 PMtask.outputDir
, just use task
(as long as outputDir
is the only output of the taskdependsOn
which always is a code smellandylamax
08/08/2022, 3:59 PM