I have a project that depends on a library in Ivy eg myorg:mylib:1.0 - this library has several artifacts:
mylib-1.0.jar mylib-api-1.0.jar mylib-core-1.0.jar
Each of these have a sources jar:
mylib-sources-1.0.jar mylib-ap-sourcesi-1.0.jar mylib-core-sources-1.0.jar
But when I generate Intellij project using gradle idea task I get the same source attachment for all these jars.
The same problem affects Intellij IDEA Gradle integration, since it uses the same dependency resolution mechanism thru tooling api See original user request at http://youtrack.jetbrains.com/issue/IDEA-128460