[aerogear-dev] AGDroid 3.0 improvements

Summers Pittman supittma at redhat.com
Thu Jul 9 16:04:47 EDT 2015


One of the things passos and I have discussed in the past is using
dependency injection (possibly dagger) to reduce a lot of the boiler plate
that is in AGDroid projects (think those nasty config blocks in the
quickstarts which exist for EVERY pipe, oauthmodule, push module, etc).  We
decided not to do that in the past because to make it work we would need to
use a gradle plugin, extend all the activity and fragment classes to
interrupt the normal lifecycle, or require the user to call magic methods.
This felt out of touch with the "style" of programming Google was
advocating at the time.

With Google play services 7.5 Google is preparing a gradle plugin which
will consume a services file and provide those values to code via static
variables. (Specifically it injects them into the value.xml file which aidl
turns into values in the Resources object).  So we've decided to revisit
the issue.

See Epic : https://issues.jboss.org/browse/AGDROID-476

We want to create a Gradle plugin which will parse ups and keycloak json
files and provide convenient tools for managing interactions with those
objects.  These tools right now will consist of providing annotations to
inject modules and interaction with the Activity lifecycle.

In the Push Issue on the Jira I have a quick sample of how the code might
look.  You can see there is a LOT less boiler plate.  The idea is that all
of the values in the PushRegistrar were parsed from json config file
automatically and the PushRegistrar was instantiated and managed
transparently.

wdyt?  What are pain points you've had with AGDroid this style of tool
could help?  Should we also make plugins for maven applications?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20150709/f3431108/attachment.html 


More information about the aerogear-dev mailing list