On 02/02/2011, at 12:45 PM, Demian Calcaprina wrote:
> Hi All,
>
> I am trying to make a gradle task to manage the releases of our project. The
> idea of this task is to make the following steps:
> 1) Checkout the code to be released in /tmp dir and set the new version
> 2) Compile the code downloaded in /tmp
> 3) Create the read only tag for the release.
>
> When I run the new task, from my checked out code in some location, it checks
> out the code in tmp ok(step 1).
> My problem is at step 2. As I am running gradle from my code and not from the
> /tmp one, how could I run gradle assemble in /tmp directory project from the
> same task that I am executing?
You could use the GradleBuild task:
task assembleOtherProject(task: GradleBuild) {
dir = '/tmp/other-project'
tasks = ['assemble']
}
See http://gradle.org/0.9.2/docs/dsl/org.gradle.api.tasks.GradleBuild.html
--
Adam Murdoch
Gradle Developer
http://www.gradle.org
CTO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz