I think, you could use init-script and TaskExecutionListener (
http://www.gradle.org/1.0-milestone-1/docs/javadoc/org/gradle/api/execution/TaskExecutionListener.html
)

This interface allows one to listen for task execution flow. Listener is
notified before and after each task execution, regardless up-to-date state.
You could wait for compile task to finish and performe required actions.

On Tue, Mar 22, 2011 at 4:23 AM, Steve Ebersole <[email protected]> wrote:

> I need a way to always run a bit of code either after compilation or before
> jar'ing.  Ideally I do not want to define a Task, because I do not really
> want
> builders to be able to run this "bit of code" itself.
>
> I tried to implement this as an Action attached to the compileJava task
> using
> doLast(), but my experience was that my Action was not performed if the
> compile task was deemed up-to-date.  Is the same true of doFirst()?
>
> Is there a way to define an Action that always gets run?
>
> ---
> Steve Ebersole <[email protected]>
> http://hibernate.org
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>


-- 
Nikita Skvortsov

Reply via email to