https://kotlinlang.org logo
#squarelibraries
Title
# squarelibraries
m

mbonnin

01/05/2023, 10:34 AM
I've been banging my head against this...
sourceDirectorySet.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.
40 Views