What are best practices for one project, multiple builders

I am working a project where part of it is built with gradle, part is built with maven, and finally, the biggest part of it is built with ant. (hold the snide comments please, i know, i know, unified build system is on the todo list).  My problem is Intellij can't decide what to do with itself.  The maven plugin in 12.1 doesnt like not being able to automatically add modules, and gradle doesn't like to not be able to add modules automatically.  What happens is if i have them both on so i stop getting the popups and such, gradle scans first and removes all the maven modules, then maven does its scan and removes all the gradle modules.  its maddening.  

common sense says make them two projects.  problem with that is many of the gradle modules use the maven modules as dependencies, and all of them are being modified at the same time.  so splitting them up really practical, at least for another year or so.  

is there anything i can do to lessen my pain here?  im about to just shut both of the builders down and start building with old reliable again, bash scripts.  

Or, is there another plugin somewhere that simply looks at my gradle and maven files and automatically configures the dependencies for the various modules.  realistically thats the only feature from a build system i really want.  I add a dependency to gradle, it sees the file change, kicks off gradle to download it and install it in the local repo, and finally configures intellij to see it.  wow, that would be beautiful.  simply beautiful.  

1 comment

Hello,

I'm afraid the only advice so far is to disabling automatic project sync for both gradle and maven plugins and do dependency management (semi-)manual. I mean that JetGradle tool window shows the whole project structure with 'gradle-local' dependencies highlighted accordingly (there is also filters facility there). Then you can just import that gradle-local dependencies directly from there. That is not too convenient but at least that must work.

Regarding the light future - we're planning to improve gradle support in order to allow a single ide project to be backed by multiple gradle (multi-)project, i.e. some ide modules will be backed by build.gradle files which belong to one hierarchy, another ide modules will be backed by gradle scripts from another hierarchy etc.

Denis

0

Please sign in to leave a comment.