cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Grieve <agri...@chromium.org>
Subject Re: Plugman support for Android libraries
Date Fri, 06 Jun 2014 20:26:29 GMT
Just tested this out today! Everything worked great except it tried to find
my custom library within the project dir instead of within the plugin.
Fixed it with:

http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/04588a42

But wanted to check that you think this is correct.


On Thu, May 15, 2014 at 4:28 AM, Martin Bektchiev <
Martin.Bektchiev@telerik.com> wrote:

> Thank you all for the comments. I think that Andrew is right and the best
> approach would be to implement it inside plugman. I have created a new JIRA
> issue and intend to start working on it:
> https://issues.apache.org/jira/browse/CB-6698
>
> I suggest the syntax in plugin.xml to be <framework src="path/to/library"
> />. Do you think that it will be good to require specification of the
> "custom=true" attribute or not?
>
>
> -----Original Message-----
> From: agrieve@google.com [mailto:agrieve@google.com] On Behalf Of Andrew
> Grieve
> Sent: Monday, May 12, 2014 5:35 PM
> To: dev
> Subject: Re: Plugman support for Android libraries
>
> Adding library support would be a definite win.
>
> "android update project" is what we use in our create / update script right
> now, and it has the side-effect of creating duplicate library entries each
> time you update your project. Writing logic to manually edit the
> project.properties file would be better I think.
>
>
> On Mon, May 12, 2014 at 2:55 AM, Martin Bektchiev <
> Martin.Bektchiev@telerik.com> wrote:
>
> > Hi guys,
> >
> > I want to ask you for ideas about how would it be best to solve an issue
> > that I'm facing. Sometimes a plugin's implementation depends on a native
> > library, but there's no easy way to embed it as a .jar file in Android if
> > the library has resources. Let's take
> > https://github.com/phonegap/phonegap-facebook-plugin and
> > https://github.com/wildabeast/BarcodeScanner for example. The former one
> > can't be automatically installed and requires manually adding the
> > FacebookSDK library. While the latter one relies on a gross hack which
> > copies the resource files to the Cordova application project and then
> > dynamically finds their IDs instead of using the R.* class. This is far
> > from optimal because it makes updating the underlying library a lot more
> > difficult, adds a lot of overhead in the plugin.xml file, adds
> performance
> > overhead at runtime for retrieving the IDs and most importantly doesn't
> > always work (e.g. the plugin installation will fail if the app itself
> > contains a res/values/colors.xml file).
> >
> > Instead of these approaches it would be much better if plugman was
> capable
> > of adding library references itself. How do you think that this should be
> > implemented? Is it a good idea to use the framework tag? Should the
> > implementation depend on calling "android update project" or would it be
> > better to directly edit the project.properties file?
> >
> > Any ideas and suggestions will be more than welcome! Looking forward to
> > your thoughts!
> >
> > Best regards,
> > Martin Bektchiev
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message