On Jun 24, 2009, at 11:09 PM, Steve Appling wrote:
>
>
> Hans Dockter wrote:
>> Cool. I'm keen to get this into 0.7.
>> On Jun 22, 2009, at 9:03 PM, Steve Appling wrote:
>>> I have a proof of concept implementation of some of this at git://
>>> github.com/sappling/gradle.git in the "opt" branch.
>>>
>>> This includes:
>>> 1) A new onlyIf method on Task
>>> 2) A new didWork method on Task
>>> 3) Implementations of didWork for Compile and GroovyCompile.
>> Amazing. For Ant 1.7.1 you probably could also use the new
>> updatedProperty. But no such thing exists for Groovyc. Excellent.
>> And I think we should expose all the information you gather. The
>> public API of the Compile task could return a list with compiled
>> files.
>>> I don't think that we can handle Ant's Copy task in this same
>>> way. We may have to use a replacement, but this has other
>>> consequences.
>> I guess the problem is that as long as the Copy task is not able to
>> tell if it did work, we can't decide whether to skip the tests
>> (unless we check the binary dir). Isn't it?
> The Ant copy task keeps a list of the files to copy, but clears it
> at the end of the execute method (comment says this is to clean up
> so a single instance can be reused).
>
> We need to know if the copy did anything (for tasks like
> processResources) so that processResources.didWork can be part of
> the onlyIf closure for test.
>
> I have a replacement implementation of Copy that doesn't use Ant,
> but I would want to give it a closer look before making it public.
> It is not exactly the same syntax as the current Copy task, but has
> some nice extra features including file renaming based on regular
> expressions and filtering content during a copy. It can also track
> if any files were actually copied.
I'm very happy to switch the Copy implementation even if it introduces
some breaking changes. I'm very interested to have a look at your
implementation.
- Hans
--
Hans Dockter
Gradle Project Manager
http://www.gradle.org---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email