Separate class exclusions per module?

Hey guys, I am trying to migrate some old eclipse projects over to IntellIJ so we can fully switch over.  I have run into a few issues, but this one is the worst.

We have one workspace setup such that there is a core module then leaf modules that basically extend from it.  They also override classes directly, by replacing the class file from the core package, during compile time in eclipse.  This works for the most part but when compiling the android module android DEX has a fit over duplicate entries (classes), so we have to manually exclude a few class files from the build.  In eclipse we can do this on a per project basis but no matter what I try, the exclusion list in IntelliJ seems to be project wide.  The problem with it being project wide is that the core module can no longer compile even though the leaf projects would properly generate the needed class files it never gets to that point because the base module, core, fails to compile.

The only way I was able to get this to work was creating seperate projects for the leaf modules and then adding the core package as a source root to each module.  

While I am well aware our setup for this project, overriding class files, is not ideal, it is how it is and I would like to make it work in IntelliJ.

Any suggestions, workarounds, hacks?

Please sign in to leave a comment.