<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">I created a cordova plugin to provide
the aerogear-android-authz dependencies [1], and changed in the
aerogear-cordova-oauth2 plugin to use this new plugin as a
dependency via the PR:<br>
<a class="moz-txt-link-freetext" href="https://github.com/aerogear/aerogear-cordova-oauth2/pull/16">https://github.com/aerogear/aerogear-cordova-oauth2/pull/16</a><br>
<br>
I am now able to add the aerogear-cordova-oauth2 to a project, and
successfully run the default cordova build. I've tested this with
my google-play-services branch, and it works well.<br>
<br>
Looking forward to hearing feedback from those more familiar with
the existing plugin's functionality.<br>
<br>
[1] <a class="moz-txt-link-freetext" href="https://github.com/bleathem/aerogear-authz-cordova">https://github.com/bleathem/aerogear-authz-cordova</a><br>
<br>
Brian<br>
<br>
On 2015-03-06 03:45 AM, Erik Jan de Wit wrote:<br>
</div>
<blockquote
cite="mid:E9D311F4-F7D6-4D0C-8DF8-9619FCFF1DE7@redhat.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Totally agree, we have to get rid of the gradle workaround, it
should not be necessary to edit the generated platform
directories. I see a third option though on the 4.0 release of the
android platform aar support will be added and one could add a
framwork dependency with type aar. We could also opt to wait for
this release. But I’m +1 on making the oath2 plugin like the
google play services plugin so that it works with `older` versions
as well.
<div class=""> <br class="">
<div class="">
<blockquote type="cite" class="">
<div class="">On 5 Mar,2015, at 23:00 , Brian Leathem <<a
moz-do-not-send="true" href="mailto:bleathem@gmail.com"
class="">bleathem@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class=""><br>
<br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=utf-8" class="">
<br>
<br>
<div text="#000000" bgcolor="#FFFFFF" class=""><br>
Hello gear-heads,<br class="">
<br>
<br class="">
<br>
The aerogear-cordova-oauth2 project currently has a
requirement to<br>
be built with gradle, in order to be able to build the
aerogear<br>
oauth2 dependencies. This affects users, as once they
add the<br>
aeorgear cordova plugin to their project, they have to
switch to a<br>
gradle-based build.<br class="">
<br>
<br class="">
<br>
I propose we look at what was done with
google-play-services as a<br>
means of working around this gradle requirement. There
are two ways<br>
to introduce a dependency to google-play-services in
your cordova<br>
project/plugin:<br class="">
<br>
<br class="">
<br>
a) Add a maven dependency:<br>
<meta http-equiv="content-type" content="text/html;
charset=utf-8" class="">
<br>
com.google.android.gms:play-services:4.0.30@aar<br
class="">
<br>
b) Add a cordova plulgin dependency:
com.google.playservices<br class="">
<br>
<br class="">
<br>
a) can be achieved only after following the<br>
how-to-build-aerogear-android [1] instructions, so an
even bigger<br>
inconvenience for users.<br class="">
<br>
<br class="">
<br>
b) on the other hand is as simple as:<br class="">
<br>
<br class="">
<br>
i) running "cordova plugin add com.google.playservices"
in your<br>
project folder<br class="">
<br>
or<br class="">
<br>
ii) adding "com.google.playservices" as a dependency to
the android<br>
section of your plugin's plugin.xml file [2].<br
class="">
<br>
<br class="">
<br>
This is made possible because the google-play-services
binaries are<br>
published as a cordova plugin via a project hosted on
github [3].<br class="">
<br>
<br class="">
<br>
I propose we create a project similar to [3], to hold
the aerogear<br>
android dependencies. Call it
"aerogear-android-services" for the<br>
sake of this argument. We would then register this
project with<br>
cordova so the aerogear-cordova-oauth2 plugin can have a
dependency<br>
on the aerogear-android-services cordova plugin, rather
then the<br>
maven/gradle dependency we have now. This would then
alleviate the<br>
aerogear-cordova-oauth2 from needing to be built with
gradle.<br class="">
<br>
<br class="">
<br>
Thoughts?<br class="">
<br>
<br class="">
<br>
[1]<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://aerogear.org/docs/guides/aerogear-android/how-to-build-aerogear-android/">https://aerogear.org/docs/guides/aerogear-android/how-to-build-aerogear-android/</a><br
class="">
<br>
[2]<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://github.com/bleathem/cordova-oauth-google-services/blob/master/plugin.xml#L28">https://github.com/bleathem/cordova-oauth-google-services/blob/master/plugin.xml#L28</a><br
class="">
<br>
[3] <a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="https://github.com/MobileChromeApps/google-play-services">https://github.com/MobileChromeApps/google-play-services</a><br
class="">
<br>
<br class="">
<br>
</div>
<br>
<br>
_______________________________________________<br
class="">
aerogear-dev mailing list<br class="">
<a moz-do-not-send="true"
href="mailto:aerogear-dev@lists.jboss.org" class="">aerogear-dev@lists.jboss.org</a><br
class="">
<a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/aerogear-dev"
class="">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></div>
</blockquote>
</div>
<br class="">
</div>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
aerogear-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/aerogear-dev">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></pre>
<br>
<br>
</blockquote>
<br>
<br>
</body>
</html>