Intellij 13: Compiler output configuration removed by gradle sync

Hi all

For each module you can select the compiler output path. We would like Intellij 13 to use the same output path as gradle (build/classes/main inside the module), which means we need to configure the output path for each module. However, when using the new gradle synchronization feature in Intellij 13, the Compiler Ouput is set back to "Inherit project compile output path" every time intellij re-generates the .iml file because we update the .gradle file - I would considder this a bug.

Regards,
Klaus

2 comments
Comment actions Permalink

Hi Klaus,

add the following in your build.gradle file:

allprojects {     apply plugin: 'idea'     idea {         module {             inheritOutputDirs = false             outputDir = file('build/classes/main')             testOutputDir = file('build/classes/test')         }     } }

0
Comment actions Permalink

Thanks Vladislav, that did the trick.

I just though that you didn't need the idea plugin for intellij 13, but I can see it is still required for configuring some module properties.
/Klaus

0

Please sign in to leave a comment.