[GRADLE-351] Set project directory as default dir for ant exec task Created: 07/Jan/09 Updated: 04/Jan/13 Resolved: 14/Jul/09 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | 0.5.1 |
Fix Version/s: | 0.7 |
Type: | Improvement | ||
Reporter: | Niko Schmuck | Assignee: | Adam Murdoch |
Resolution: | Fixed | Votes: | 0 |
Description |
Would be handy if the dir argument for the ant exec task is already set to the project directory, currently (Gradle 0.5.1) I have to set it manually. Sample call from my subproject: ant.exec(executable: 'cmd', dir: projectDir) { arg(value: '/c') arg(value: 'nmake') arg(value: '/f') arg(value: 'win32\\Makefile.msc') } |
Comments |
Comment by Hans Dockter [ 07/Jan/09 ] |
Some people who use Gradle are Ant users and other are not. And Groovy offers its own, alternative way of executing processes which people may choose. So we probably don't want to bake it into the core. But your feature request has inspired the idea, to create an Ant plugin which can be hooked in if people like this. This plugin could provide preconfigured Ant tasks to execute (e.g. a preconfigured exec task). |
Comment by Niko Schmuck [ 08/Jan/09 ] |
I could see much value, by introducing an own "antPlugin", especially in cases were you have to deal with integrating legacy projects (were neither java or groovy is used), simplifying notation, sharing and reusing tasks would be of great help here. |
Comment by Adam Murdoch [ 08/Jan/09 ] |
An easy fix for this, which is probably the correct thing to do anyway, is when we create an AntBuilder, set the base directory of its ant project to the project dir. The exec task (and a whole bunch of others tasks) use the ant project's base dir as the default dir. |
Comment by Hans Dockter [ 10/Jan/09 ] |
There is now an issue for Adam's proposal: http://jira.codehaus.org/browse/GRADLE-353 |