Hi devs,

I'm currently struggling with finishing plugin for gradle to run unit test 
using robolectric and groovy. You can check the webstie www.robospock.org.

I'm having very weird problem with casting to AppPlugin. (source 
https://github.com/pjakubczyk/robospock-plugin/blob/master/robospock-plugin/src/main/groovy/org/robospock/RobospockPlugin.groovy)
 

I have following line of code:
def appPlugin = androidProject.plugins["android"]

but when I want to have non-dynamic version: 
AppPlugin appPlugin = androidProject.plugins["android"]

I see such exception:
Cannot cast object 'com.android.build.gradle.AppPlugin@7b3d09b1' with class 
'com.android.build.gradle.AppPlugin' to class 
'com.android.build.gradle.AppPlugin'

Maybe you have any clue what is going on here? To be honest I don't need to 
remove 'def' word but it also return false on such statement androidProject.
plugins["android"] instanceof AppPlugin ...

Hope you have some ideas.

Przemek

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to