[GRADLE-533] Initial Framework for Task Optimization Created: 29/Jun/09  Updated: 04/Jan/13  Resolved: 01/Jul/09

Status: Resolved
Project: Gradle
Affects Version/s: 0.6
Fix Version/s: 0.7

Type: New Feature
Reporter: Steve Appling Assignee: Hans Dockter
Resolution: Fixed Votes: 0

Attachments: Text File opt1.patch    

 Description   

Add the initial framework for specification of manual optimization criteria as discussed in the thread at http://www.nabble.com/Task-Optimization-to24117691.html

This patch adds:

  • onlyIf and getDidWork methods to Task.
  • Implementations of getDidWork for Compile and GroovyCompile
  • New Command Line argument to skip optimization (-o)
  • Simple integration test to exercise it.

It does not have any updates for the documentation.
It does not have any helper methods to utilize the file change detection code.

I would like to try to pursue (in the next step) how to have more useful built in optimizations for Java and Groovy plugins.
I did not want to spend too much time on the integration tests or documentation until we decide how we want this done.



 Comments   
Comment by Adam Murdoch [ 01/Jul/09 ]

I'm not sure about the new command-line option. Why do we need it?

Comment by Steve Appling [ 02/Jul/09 ]

The new command line option was added for the case where the onlyIf optimization is not be 100% correct. There will be items that can change that may not allow a task to run when it should. For example, you may not pick up build.gradle changes that should force the task to re-run. This allows you to force the tasks to run without having to do a clean. A clean build for a big system can be very expensive (ours is over 10 minutes).

That being said, it is really optional. You can accomplish the same thing with clean. I also do not like the large number of command line options that we currently have. I hope that some of them can be simplified (or removed) when the command line syntax is reviewed.

Generated at Wed Jun 30 11:32:32 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.