mbonnin
01/05/2023, 10:34 AMsourceDirectorySet.srcDir(...)
works well for non-Android projects. For Android, I think you have to use onVariant {}
and addGeneratedSourceDirectory()
to get proper IDE support (but it's not 100% clear what).
addGeneratedSourceDirectory
takes ownership of the directory where the file are generated so it takes a mutable FileProperty
as input.