our sourceset does not exist?
My motivation is that I would like to do something similar, probably using my
buildSrc
, but I don’t know which kind of magic we are using here.
Is the kotlin build process somehow extracting the variable names and comparing them with the available sourcesets?
r
r4zzz4k
03/15/2019, 6:49 PM
Extracting the variable name part comes from property delegates feature. You get reflected property instance from which you can get the name.
https://kotlinlang.org/docs/reference/delegated-properties.html
As for the sourcesets, you just check the model of the project you have.
g
GarouDan
03/15/2019, 6:58 PM
Hum, thanks, indeed. I’ve already read the delegates documentation but I wasn’t remembering that we could get the property name there. Thanks