Open gilbertg opened 8 years ago
hi! I was thinking on configuring it like a mule embedded project, however this will make your dependencies compile time, and you don't want that. So the only option I can think of, is to use the provided compile scope.
Having all mule dependencies as provided would actually be a good idea to build a project type to build mule patches or core extensions, however this is not something I officially plan to do.
Take a look at how I create the provided compile scope and you may get some inspiration.
hi Juan, thanks for the very quick response. So i just tried this:
configurations {
providedCompile
providedCompile
providedCompile.visible = false
compile.extendsFrom providedCompile
}
apply plugin: 'mule-dependencies'
Since your mule-dependencies plugin does use the providedCompile
configuration when available.
This gets the Gradle build working (as in, i can compileJava
on ESBCommon now), but breaks running the master mule app through - i.e. when i re-gen my .project and .classpath with gradle cleanEclipse eclipse
, and try to run my app.
My problem is, i don't know how to tell gradle about explicit mule dependencies, since it was always hidden behind the mule plugin. Maybe inspiration i need it your mechanism for resolving Mule dependencies.
A nasty jack would be to use gradle-dependencies, and manipulate the .classpath
thereafter, so Studio is not confused.
Included Studio's breakage log, incase you're interested. Anypoint Studio Run App.zip
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:
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;
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...