Hi, we have multiple Mule projects, and have created a shared project that contains utilities - some of which are dependent on Mule libraries. The Gradle file for this shared project look like this:
dependencies {
compile project(':Shared')
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.3.2'
compile group: 'javax.activation', name: 'activation', version: '1.1'
compile group: 'javax.xml.stream', name: 'stax-api', version: '1.0-2'
compile group: 'log4j', name: 'apache-log4j-extras', version: '1.2.17'
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5'
compile group: 'commons-httpclient', name: 'commons-httpclient', version: '3.1'
}
eclipse.classpath.file {
withXml { provider ->
def root = provider.asNode()
root.appendNode('classpathentry', [kind: 'con', path: 'MULE_RUNTIME', exported: 'true'])
}
}
As you can see, I've forced Anypoint Studio to reference the MULE_RUNTIME container. This is 100% - the projects are referenced as expected, and Anypoint does not try to treat the common project as a Mule app. This also runs and deploys 100% through Anypoint Studio.
Below is the project structure;
- esb is a mule project
- ESBCommon is our shared project with Mule-enhancing utilities
- Shared is a normal java project with no Mule dependencies

Problem comes in when we try to build through Gradle, the project (understandably) can't find any of the Mule dependencies. Can you suggest a way to include the Mule dependencies for the gradle build?
I'm trawling through your Gradle plugin, code, but suspect it will be some time before i understand enough of Gradle plugins, and the mechanisms of this project.
Thanks...