Correct way to transform outputs of existing Tasks

Hello,

I’m working on a plugin that intercepts the results of one task – say the compiled classes of compileJava(Debug|Release) – modifies them, and then provides them to all tasks that were to receive the original results. To do this, we would lookup all tasks that depend on the compileJava* tasks and update the corresponding inputs of the dependent tasks. We’re doing this with the android plugin, so our configuration isn’t as simple as a normal Java build. We’re not just intercepting classes, but DEXes, and resources as well.

This model had been working for a while, but with the Android 1.5 plugin, we are seeing:

org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter$1: Cannot set the value of read-only property 'streamInputs' on task ':BasicAndroidKeyStoreSample:transformClassesWithDexForDebug'.

This looks like a gradle-supported way to make the property unmodifiable.

So my questions are:

1) Is there a way around this error that's not completely unsafe?
2) What's the recommended way to intercept and transform outputs in gradle?