Open lptr opened 6 years ago
At first glance, I thought it was just sloppy programming. But there is a reason I originally accessed the field directly - I need the raw values, some of which are instances of SourceDirectorySet.
It's ugly but reflection might be the only solution 👎👎
Why do you need the SourceDirectorySet
? Why does gosu need both the source directories and the sources themselves? Could you maybe calculate the source directories by observing the source files (and collecting common root dirs)?
Yes that can work. There are some complicating factors though; I'll be in touch via Slack.
See gradle/gradle#6845
In
getSourceRoots()
there is this code that refers to thesource
field fromSourceTask
:The
source
field was exposed before asprotected
, but we are removing that in Gradle 5.0. Please usegetSource()
instead.