So I have a project that contains a few subprojects that I am using Gradle with. What I would like to do is copy the resources from subprojectA to the main subprojectB. My structure looks like so.
Application
\subprojectA
\src\main\resources\blah
\subprojectB
\src\main\...
What I want to do, is when my application builds and compiles, overlay the resources folder from subprojectA into the main application's resource folder.
I've tried creating a Gradle task which looks like
task copyExtractorResources(type: Copy) {
from 'extractors/src/main/resources/'
into 'main/build/resources'
}
and while it runs, I can't for the life of me find out how to say "Hey, always do this task before building"
Any help is greatly appreciated.