edwinRNDR
08/28/2021, 5:04 PMkpgalligan
08/28/2021, 6:19 PMedwinRNDR
08/28/2021, 7:21 PMbuildSrc I have a task embedShaders that turns glsl into .kt files. I create a shaderKotlin sourceset on which the main sourceset depends. This part works. The thing that breaks for me is to have shaderKotlin 's files be created by embedShaders as part of the build. I have added task dependencies but those trigger Gradle to detect implicit dependencies on files generated by embedShadersmbonnin
08/29/2021, 9:56 AMsrcDir() with a provider from your code generating class that carries its task dependency:
val shaderKotlin by creating {
this.kotlin.srcDir(embedShaders.flatMap { it.outputDir })
}edwinRNDR
08/30/2021, 6:40 AMflatMap is not needed but setting the srcDir to embedShaders.outputDir seems to do the trick. So simple in the end 🙂edwinRNDR
08/30/2021, 6:40 AM