[GRADLE-271] Linking tasks with dependency configurations should not be a part of dependencies (linkConfWithTask) Created: 22/Oct/08 Updated: 04/Jan/13 Resolved: 07/Apr/09 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | 0.4 |
Fix Version/s: | 0.6 |
Type: | Improvement | ||
Reporter: | Martin Vlcek | Assignee: | Hans Dockter |
Resolution: | Fixed | Votes: | 0 |
Issue Links: |
|
Description |
The dependency definition should be independent of the tasks. Instead of createTask('clientCompile', type: Compile) { ... }it should rather be createTask('clientCompile', type: Compile) { configurations = [ 'client' ] ... }Reasons:
|
Comments |
Comment by Martin Vlcek [ 23/Oct/08 ] |
For better readability one can use the following lines: createTask('clientCompile', type: Compile) { This should at least be simplified by adding a method linkWithConf(String... confName) to the (relevant) tasks, thus allowing to specify: createTask('clientCompile', type: Compile) { This is a trivial change supporting both ways to define dependencies without changing the current architecture of gradle. BTW: isn't it "link sth. TO sth."? |
Comment by Hans Dockter [ 25/Oct/08 ] |
Have a look at http://jira.codehaus.org/browse/GRADLE-183 (which also contains a link to a discussion about this issue on the dev list). |
Comment by Hans Dockter [ 07/Apr/09 ] |
We have now a different, much nicer, mechanism. A configuration has now a property buildDependencies which returns a task. What you can do now is to say: createTask('myTask', dependsOn: configurations.runtime.buildDependencies) {
...
}
If runtime has project dependencies, those projects are now build before myTask is executed. |