[aerogear-dev] Removing gradle from the aerogear-cordova-oauth2 build
Brian Leathem
bleathem at gmail.com
Fri Mar 6 17:58:34 EST 2015
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:
https://github.com/aerogear/aerogear-cordova-oauth2/pull/16
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.
Looking forward to hearing feedback from those more familiar with the
existing plugin's functionality.
[1] https://github.com/bleathem/aerogear-authz-cordova
Brian
On 2015-03-06 03:45 AM, Erik Jan de Wit wrote:
> 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.
>
>> On 5 Mar,2015, at 23:00 , Brian Leathem <bleathem at gmail.com
>> <mailto:bleathem at gmail.com>> wrote:
>>
>>
>>
>>
>>
>>
>>
>> Hello gear-heads,
>>
>>
>>
>> The aerogear-cordova-oauth2 project currently has a requirement to
>> be built with gradle, in order to be able to build the aerogear
>> oauth2 dependencies. This affects users, as once they add the
>> aeorgear cordova plugin to their project, they have to switch to a
>> gradle-based build.
>>
>>
>>
>> I propose we look at what was done with google-play-services as a
>> means of working around this gradle requirement. There are two ways
>> to introduce a dependency to google-play-services in your cordova
>> project/plugin:
>>
>>
>>
>> a) Add a maven dependency:
>>
>> com.google.android.gms:play-services:4.0.30 at aar
>>
>> b) Add a cordova plulgin dependency: com.google.playservices
>>
>>
>>
>> a) can be achieved only after following the
>> how-to-build-aerogear-android [1] instructions, so an even bigger
>> inconvenience for users.
>>
>>
>>
>> b) on the other hand is as simple as:
>>
>>
>>
>> i) running "cordova plugin add com.google.playservices" in your
>> project folder
>>
>> or
>>
>> ii) adding "com.google.playservices" as a dependency to the android
>> section of your plugin's plugin.xml file [2].
>>
>>
>>
>> This is made possible because the google-play-services binaries are
>> published as a cordova plugin via a project hosted on github [3].
>>
>>
>>
>> I propose we create a project similar to [3], to hold the aerogear
>> android dependencies. Call it "aerogear-android-services" for the
>> sake of this argument. We would then register this project with
>> cordova so the aerogear-cordova-oauth2 plugin can have a dependency
>> on the aerogear-android-services cordova plugin, rather then the
>> maven/gradle dependency we have now. This would then alleviate the
>> aerogear-cordova-oauth2 from needing to be built with gradle.
>>
>>
>>
>> Thoughts?
>>
>>
>>
>> [1]
>> https://aerogear.org/docs/guides/aerogear-android/how-to-build-aerogear-android/
>>
>> [2]
>> https://github.com/bleathem/cordova-oauth-google-services/blob/master/plugin.xml#L28
>>
>> [3] https://github.com/MobileChromeApps/google-play-services
>>
>>
>>
>>
>>
>> _______________________________________________
>> aerogear-dev mailing list
>> aerogear-dev at lists.jboss.org <mailto:aerogear-dev at lists.jboss.org>
>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
>
>
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20150306/805c8f1e/attachment.html
More information about the aerogear-dev
mailing list