robospice
robospice copied to clipboard
Add "execute" method which could get Lambdas.
As:
getSpiceManager().execute(request, response -> someWork(response), spiceException -> onError(spiceException ));
Lambdas are not yet supported in Android.
https://github.com/evant/gradle-retrolambda I use lambdas in my Android project. I can do pull-request with this, but not soon.
That would (not too necessarily) add a dependency to another project/plugin. Developers who use lambdas may always extend their SpiceManager
to include a lambda construct like you proposed.
Also, RoboSpice is very open for contributors and this is a fine case for creating an extension.
I wrote it but I thought that to have the opportunity out of the box is good idea https://gist.github.com/georgeci/4229e8142f6ff6306521
Nice! I would still suggest doing an extension as lambdas are not the most standard constructs in Android and using them does not add anything to the core behavior of RoboSpice. Reopened the issue so that we can have anyone else's feedback.
Hi guys, I agree it would be a nice addition. Extensions in RS are designed for this kind of things.. (I say this to reconciliate @nkeskinov concern of not adding this to the core and still adding the feature). In that case, how could we make it so that this extension can be combined with any others ? (without having to double every single module).
I am sorry not to be very active. But still, I got ideas to extend RS but don't have time to work on that now.