How can I get Gradle dependency order to be consistent in Intellij's modules?

Using Gradle 2.1

Given project A:

dependencies { compile group: 'org.slf4j', name: 'slf4j-api', version:'1.6.4' }

And project B:

dependencies {
    compile group: 'org.slf4j', name: 'slf4j-api', version:'1.7.2'
    compile (project: 'A') {
        exclude(module: 'slf4j-api')
    }
}

‘gradle :b:dependencyInsight’ tells me that there are no conflicts for ‘slf4j-api’ and correctly resolves to version 1.7.2.

However when I run ‘gradle idea’, the module dependencies for project B put project A first and ‘slf4j-api:1.7.2’ second causing compilation to fail in IntelliJ.

Is there a way to enforce declared order of dependencies within the ‘dependencies’ method call in my ‘build.gradle’ file?

I would love to be able to run ‘gradle cleanIdea idea’ as often as I want and get a faithful representation of my Gradle configuration in IntelliJ.

Thanks