Gradle Intellij integration. Set test resources dir to separate disc

(aardvark) #1

I have problem with configuration of Intellij project with gradle.
I need to set test resources directory to some dir.

I can easilly do this through Intellij config.
When is use gradle its build file take precedence over project configuration and original project config gets erased.
So i tried to setup test resources thorough some gradle plugins.
Firstly i tried ‘idea’ plugin.
After about 3 hours inside docs i have no idea how to create separate content source, one solution i have is just to embeed xml generated with Intellij to the idea plugin hooks, but this was kindly excessive and too much xml in my opinion.
Secondly i tried using ‘java’ plugin and define sourceSets.test.resources.srcDir property to required directory.
There is where ‘fun’ part starts requred directory reside on different disk drive and i get whole drive added to the project when i try this thing.
So instead adding ‘D:/somedir/resources’ whole disk D is added. And then indexing starts and then everything dies due to gc.

So this question has 2 parts.

  1. How can i add resource test set using ‘idea’ plugin? (if it is possible)
  2. Is this some sort of bug in disk resolution in ‘java’ plugin or this is inteded behaviour?