Griddle icon indicating copy to clipboard operation
Griddle copied to clipboard

Griddle crashes builds using latest Gradle versions (2.5+)

Open rjam opened this issue 9 years ago • 1 comments

I've been using griddle for a while now together with the last stable 1.x DBFlow release: 1.8.1.

Lately I've been in dire need to update my gradle distribution and wrapper (currently still on 2.4 with android's gradle wrapper 1.5.0) to take advantage of the much required speed improvements but unfortunately when I update my gradle distribution to anything over 2.4, my builds all fail with:

Error:Gradle DSL method not found: 'executeWithoutThrowingTaskFailure()'

After some debugging, I can see from the full stack trace that the error comes from Griddle while attempting to link sources..this one was obtained with gradle 2.10:

org.gradle.api.internal.MissingMethodException: Could not find method executeWithoutThrowingTaskFailure() for arguments [] on task ':linkSources'.
        at org.gradle.api.internal.AbstractDynamicObject.methodMissingException(AbstractDynamicObject.java:68)
        at org.gradle.api.internal.AbstractDynamicObject.invokeMethod(AbstractDynamicObject.java:56)
        at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:175)
        at com.raizlabs.LinkSourcesTask_Decorated.invokeMethod(Unknown Source)
        at com.raizlabs.LinkSourcesTask$_linkSourcesFromProject_closure1.doCall(LinkSourcesTask.groovy:45)
        at org.gradle.listener.ClosureBackedMethodInvocationDispatch.dispatch(ClosureBackedMethodInvocationDispatch.java:40)
        at org.gradle.listener.ClosureBackedMethodInvocationDispatch.dispatch(ClosureBackedMethodInvocationDispatch.java:25)
        at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:44)
        at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:79)
        at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:30)
        at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
        ...

If it helps, my app's dependencies block goes like this:

apt "com.raizlabs.android:DBFlow-Compiler:1.8.1"
mod "com.raizlabs.android:{DBFlow-Core, DBFlow}:1.8.1"

How can I fix this? Do I really need to use griddle in order to have this version of DBFlow? I've tried changing mod for nsMod but that didn't help..

rjam avatar Jan 28 '16 20:01 rjam

FWIW, I've traced the issue to this change in gradle 2.5 (here).

executeWithoutThrowingTaskFailure() was removed..workaround to get the same behaviour would be perhaps to just call execute() and ignore any failure state.

Since AS seems to already support source linking I've ended up removing griddle altogether, so feel free to close this.

rjam avatar Feb 11 '16 16:02 rjam