[GRADLE-1078] eclipse .classpath generation should order source folders per usual conventions Created: 29/Jul/10 Updated: 04/Jan/13 Resolved: 13/Jan/11 |
|
| Status: | Resolved |
| Project: | Gradle |
| Affects Version/s: | 0.9.1 |
| Fix Version/s: | 0.9.2 |
| Type: | Improvement | ||
| Reporter: | Chris Beams | Assignee: | Peter Niederwieser |
| Resolution: | Fixed | Votes: | 0 |
| Issue Links: |
|
||||||||
| Description |
|
gradle-generated .classpath files currently order source folders in a way that violates expectations. Actual ordering: src/main/resources src/main/java src/test/resources src/test/java Expected ordering: src/main/java src/main/resources src/test/java src/test/resources |
| Comments |
| Comment by Peter Niederwieser [ 13/Jan/11 ] |
|
Chris, I have some questions: 1. Is this an aesthetic issue, or does it have deeper impacts? |
| Comment by Chris Beams [ 13/Jan/11 ] |
|
Hi Peter, (1) It is cosmetic, but important. As I'm sure you're aware, there's a strong convention, especially from a Maven perspective to order things as follows: src/main/java src/main/resources src/test/java src/main/resources Seeing things reversed or otherwise out of the ordinary makes the user feel like the IDE integration is an afterthought (it's off-putting at least). (2) I think it's important to enforce main first, then test in any case. (3) Yes. I think it adheres to the principle of least surprise. Thanks! |
| Comment by Peter Niederwieser [ 13/Jan/11 ] |
|
Given the following build script... apply plugin: "java"
apply plugin: "groovy"
apply plugin: "eclipse"
sourceSets {
integTest {
resources {
srcDir "src/integTest/resources"
}
java {
srcDir "src/integTest/java"
}
groovy {
srcDir "src/integTest/groovy"
}
}
}
...source folders are now ordered as follows: "src/main/java" "src/main/groovy" // all other source folders come in between "java" and "resources" "src/main/resources" "src/test/java" "src/test/groovy" "src/test/resources" "src/integTest/java" // all other source sets come after "main" and "test" "src/integTest/groovy" "src/integTest/resources" Does this match your expectations? |
| Comment by Chris Beams [ 13/Jan/11 ] |
|
Yes, perfect! |