On 05/12/2012, at 2:23 PM, Xavier Ducrohet wrote: > Currently plugins don't have access to the list of changed files (input and > output) that triggered Gradle to re-run a task. > > The Android plugin is adding several steps to the compilation, and we'd like > to make sure that we can do them as incremental steps. We could replicate > what Gradle already computes but this seems silly as Gradle already has the > data. > > Any chance this will become part of the official API?
Absolutely. We want to provide something there. We would also use this in Gradle to improve the compile tasks (to fix GRADLE-1501, for example) and make the copy task incremental, and (probably) to fix some long standing bugs with the copy and archive tasks. There's no concrete plan just yet for how that API would look. What information would you need from such an API? > > We are also looking at some tasks that would require storing some information > somewhere to improve speed when running the task incrementally. I see there > are some things stored inside .gradle/<version>/taskArtifacts and I was > wondering if plugin can get access to this (or just simply write directly to > it). Not yet. The above API might provide something, where you can attach some state to the task, or perhaps to each output file, and have Gradle persist it for you. What sort of information do you want to store? -- Adam Murdoch Gradle Co-founder http://www.gradle.org VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting http://www.gradleware.com
