vendredi 15 janvier 2016

IntelliJ execute gradle test from root project

I've a gradle multiproject importend in my IntelliJ, and I want execute some test classes.

The structure is like:

root
|-module-a
|-module-b

module-a depends on module-b, so in the build.gradle

dependencies {
    compile project('module-b');
}

When I use gradle from the shell everything it's ok, I have to go in the root project dir and write:

./gradlew :module-a:test

And everything it's been tested.

When I click "Run 'Tests' in 'module-a'" from IntelliJ I have this error:

A problem occurred evaluating root project 'module-a'.
> Project with path ':module-b' could not be found in root project ':module-a'.

So it seems, that IntelliJ is executing the gradle command from module-a and not from the root (this should be the correct behavior from what gradle wants).

How can execute this test inside IntelliJ? What I have to configure?

Aucun commentaire:

Enregistrer un commentaire