Until recently I had a jar task definition like this:
For some reason we didn’t want to include Xml files from ‘src/main/resources’.
This policy changed, and it was decided to just include one of the multiple Xml files. So I changed the jar definition like this:
Now, this resulted in compile errors! The compiler complained about not finding classes from another subproject. First, this led me to find the cause of the problem in some changed java sources or changed gradle properties. Nothing caused this problem. So I changed the jar task to this
and the compile errors went away. (That is: I could not say exclude-all-xml but include-specific-xml.)
I tested with Gradle 2.4.1 and Gradle 3.0. Maybe it is naive to think that the jar task definition should not influence compile dependencies? After all, this is not a compile dependency definition.