DefaultTask broken in Gradle 2.0


(Pablo Munoz) #1

Have the following code snippet:

class MyTask extends DefaultTask {

@Input

String state

def taskState = getState()

This fails to compile in 2.0 with this error:

The return type of java.lang.String getState() in MyTask is incompatible with org.gradle.api.tasks.TaskState in org.gradle.api.internal.AbstractTask

I think this is related to this change for decorated classes http://code-review.gradle.org/changelog/Gradle?cs=a4cf5918eb95ab13bd369a2f53092444b5847890