[GRADLE-3170] Gradle 'idea' task generates wrong sources jar for multi artifact dependencies Created: 17/Sep/14  Updated: 10/Dec/14  Resolved: 10/Dec/14

Status: Resolved
Project: Gradle
Affects Version/s: None
Fix Version/s: 2.3-rc-1

Type: Bug
Reporter: Gradle Forums Assignee: René Gröschke (Inactive)
Resolution: Fixed Votes: 0

Issue Links:
Related
Related to GRADLE-2733 Gradle should honour Ivy artifact typ... Resolved
Related to GRADLE-3210 IDEA model in Tooling API does not al... Resolved
Related to GRADLE-2430 eclipse task does not attach source i... Resolved

 Description   

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 [1]http://youtrack.jetbrains.com/issue/I...
----------------------------------------------------------------------------------------
[1] http://youtrack.jetbrains.com/issue/IDEA-128460



 Comments   
Comment by Gradle Forums [ 17/Sep/14 ]

The project attachment on the original issue [1]http://youtrack.jetbrains.com/issue/I... demonstrates the problem.
----------------------------------------------------------------------------------------
[1] http://youtrack.jetbrains.com/issue/IDEA-128460

Comment by Daz DeBoer [ 10/Dec/14 ]

This issue has been fixed by attaching all source artifact to each jar artifact in IDEA. This doesn't fix the issue when importing into IDEA, since this requires a fix to the Tooling API. I've raised GRADLE-3210 for this issue.

Generated at Wed Jun 30 12:41:48 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.