[GRADLE-1116] IDEA/Eclipse plugins should replace all classpath references to a project's classes/test classes directory with a project dependency Created: 14/Aug/10  Updated: 01/Sep/16  Resolved: 01/Sep/16

Status: Resolved
Project: Gradle
Affects Version/s: 0.9
Fix Version/s: None

Type: Bug
Reporter: Adam Murdoch Assignee: Unassigned
Resolution: Won't Fix Votes: 4

Issue Links:
Duplicate
Duplicates GRADLE-1766 A dependecy on sourceset.classes brea... Resolved

 Description   

For example:

dependencies { compile project('other').sourceSets.main.classes }

This ends up as a module library containing the other project's 'build/main/classes' directory. This should be transformed into a project dependency in the module file (or better yet, in the compile configuration so that this information is available elsewhere).

A similar problem happens within a project too. For example, say I add an integration test source set:

configurations { integTestCompile }
sourceSets { integTest { compileClasspath = configurations.integTestCompile } }
dependencies { integTestCompile sourceSets.main.classes } }
ideaModule { scopes.TEST.plus.add(configurations.integTestCompile) }

Running gradle ideaModule generates a module file containing 'build/classes/main' as a module library. This should be removed, as there is already an implicit dependency on the main classes.



 Comments   
Comment by Stefan Oehme (Inactive) [ 01/Sep/16 ]

Closing as both of these snippets are not how dependencies should be used:

The former should be a simple project dependency. The latter should add the main output to the integTest compileClasspath instead of defining a dependency.

Generated at Wed Jun 30 11:47:19 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.