You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Andrew Lunny <al...@gmail.com> on 2012/06/09 03:40:39 UTC

Plugin Format and Spec

Hi all,

I've posted to this list before about pluginstall[1], the tool I've
developed as part of working on PhoneGap Build and requiring programmatic
installation of Cordova plugins.

I've now written up a spec for the format that pluginstall uses - I think
it's generally useful for Cordova plugin installation and manipulation. The
spec is available on GitHub:
https://github.com/alunny/cordova-plugin-spec

Issues and/or pull requests and/or forks welcome.

Cheers,
Andrew

[1] https://github.com/alunny/pluginstall

Re: Plugin Format and Spec

Posted by Brian LeRoux <b...@brian.io>.
version number in the manifest so users have a sense of where it
should work; deprecation policy, etc on the cordova side

On Mon, Jun 25, 2012 at 1:18 PM, Filip Maj <fi...@adobe.com> wrote:
> You don't see any reason why plugins should support different versions of
> cordova? Cordova gets released every month. This seems like a pretty
> important thing to figure out IMO
>
> On 6/25/12 1:12 PM, "Anis KADRI" <an...@gmail.com> wrote:
>
>>I think we should agree on a spec (plugin package and plugin interface)
>>and
>>stick to it. As long as we don't break the plugin interface, I don't see
>>any reason why plugins should support multiple versions of Cordova. If
>>there are any, I'd love to hear them.
>>
>>On Mon, Jun 25, 2012 at 1:01 PM, Filip Maj <fi...@adobe.com> wrote:
>>
>>> Back onto the versioning question..
>>>
>>> 1. Do we want to support different version of the cordova framework in
>>> plugins, within a single repo, across versions that changed the
>>> native/javascript plugin API?
>>> 2. How?
>>>
>>> If the answer to (1) is yes, one idea for (2) might be nesting another
>>> directory level in the all of the source directories that contains the
>>> version number supported. For example:
>>>
>>> src/android/1.5.0/*.java
>>> src/android/1.8.1/*.java
>>> www/1.5.0/childbrowser.js
>>> www/1.8.1/childbrowser.js
>>>
>>> Could get gnarly real quick though. Another, cleaner implementation in
>>> terms of file system "noise" might be to employ a git branches
>>> convention.. But that would enforce a git dependency.
>>>
>>> Just brainstorming / thinking out loud. Both are probably bad ideas :)
>>>
>>> On 6/25/12 11:41 AM, "Michael Brooks" <mi...@michaelbrooks.ca> wrote:
>>>
>>> >We may also want to describe testing from JavaScript and Native.
>>> >
>>> >I would also like to see a repository called "cordova-plugin-template"
>>> >that
>>> >is a boilerplate to start writing any plugin. The idea is that users
>>>start
>>> >with something that works, with tests, and documentation boilerplate -
>>> >perhaps it can be an echo plugin since that has a minimal footprint.
>>> >
>>> >On Mon, Jun 25, 2012 at 11:28 AM, Filip Maj <fi...@adobe.com> wrote:
>>> >
>>> >> Looks great. I'll add some detail to the list you have here. I'd
>>> >>recommend
>>> >> tweaking the order a little bit; introducing the JS before the native
>>> >>APIs.
>>> >>
>>> >> # Plugin Author Guide
>>> >>
>>> >> - plugin package format -> points to Andrew's plugin spec
>>> >> - js api
>>> >> --- basically documenting exec(). Service, action, callbacks,
>>>arguments.
>>> >> What about how arguments are translated from JS types (string,
>>>number,
>>> >> objects, etc) to native types for each platform?
>>> >>
>>> >> - native api
>>> >> --- ios
>>> >> --- android
>>> >> --- blackberry
>>> >> --- windowsphone
>>> >> --- bada
>>> >>
>>> >>
>>> >> On 6/25/12 11:16 AM, "Brian LeRoux" <b...@brian.io> wrote:
>>> >>
>>> >> >Biggest question is how to document. My thinking is that we want to
>>> >> >specify the PluginPackage so that PluginInstall works. So the docs
>>> >> >would read like this:
>>> >> >
>>> >> ># Plugin Author Guide
>>> >> >
>>> >> >- plugin package format
>>> >> >- native api
>>> >> >--- ios
>>> >> >--- android
>>> >> >--- blackberry
>>> >> >--- windowsphone
>>> >> >--- bada
>>> >> >- js api
>>> >> >
>>> >> >Thoughts? (If this looks good I will update the issue.)
>>> >> >
>>> >> >
>>> >> >
>>> >> >On Mon, Jun 25, 2012 at 10:50 AM, Filip Maj <fi...@adobe.com> wrote:
>>> >> >> Hah Michael and I were just talking about that..
>>> >> >>
>>> >> >> I will send a pull request to Andrew's draft spec
>>> >> >>
>>> >> >> On 6/25/12 10:46 AM, "Brian LeRoux" <b...@brian.io> wrote:
>>> >> >>
>>> >> >>>npm does this w/ an 'engines' attribute on package.json
>>> >> >>>
>>> >> >>>On Mon, Jun 25, 2012 at 10:26 AM, Filip Maj <fi...@adobe.com> wrote:
>>> >> >>>> One more thing that came to mind is how to support different
>>> >>versions
>>> >> >>>>of Cordova? Any ideas?
>>> >> >>>>
>>> >> >>>> From: Andrew Lunny <al...@gmail.com>>
>>> >> >>>> Reply-To: "alunny@gmail.com<ma...@gmail.com>"
>>> >> >>>><al...@gmail.com>>
>>> >> >>>> To: Default User Nam <fi...@adobe.com>>
>>> >> >>>> Cc:
>>> >> >>>>"callback-dev@incubator.apache.org<mailto:
>>> >> callback-dev@incubator.apache
>>> >> >>>>.o
>>> >> >>>>rg>"
>>> >> >>>><callback-dev@incubator.apache.org<mailto:
>>> >> callback-dev@incubator.apache
>>> >> >>>>.o
>>> >> >>>>rg>>
>>> >> >>>> Subject: Re: Plugin Format and Spec
>>> >> >>>>
>>> >> >>>>
>>> >> >>>>
>>> >> >>>> On 11 June 2012 13:50, Filip Maj
>>> >><fil@adobe.com<mailto:fil@adobe.com
>>> >> >>
>>> >> >>>>wrote:
>>> >> >>>> Nice work Andrew! I suggest taking this and moving to a cordova
>>> >>wiki
>>> >> >>>>page
>>> >> >>>> (assuming all committers are on board to adopting this as the
>>>basis
>>> >> >>>>for
>>> >> >>>>a
>>> >> >>>> plugin spec)
>>> >> >>>>
>>> >> >>>> A link on the Cordova wiki is probably the best place to start
>>>- we
>>> >> >>>>can
>>> >> >>>>get some more feedback from plugin authors and app developers
>>>(i.e.
>>> >> >>>>keep
>>> >> >>>>this as "a way to write plugins" rather than "the official way to
>>> >>write
>>> >> >>>>plugins").
>>> >> >>>>
>>> >> >>>>
>>> >> >>>> Is target-dir necessary for the <source-file> element? For Java
>>> >>files,
>>> >> >>>>the
>>> >> >>>> tooling could take a peak inside the .java file and extract out
>>>the
>>> >> >>>> package name from the file, no? Phonegap build already does this
>>> >> >>>>doesn't
>>> >> >>>> it?
>>> >> >>>>
>>> >> >>>> PhoneGap Build did do this, but no longer supports uploading
>>> >>arbitrary
>>> >> >>>>Java files. Only plugins with a manifest are supported.
>>> >> >>>>
>>> >> >>>> I'm torn - one of the goals of this format is to make it as
>>>easy as
>>> >> >>>>possible to write tools that use it as possible. Right now, a
>>>tool
>>> >> >>>>reads
>>> >> >>>>one file (plugin.xml) and moves source files (ignoring config
>>>files
>>> >>for
>>> >> >>>>the moment). I'd prefer it wasn't "read one file, then read each
>>> >>.java
>>> >> >>>>file to discover where to move it".
>>> >> >>>>
>>> >> >>>> One option is to use the id attribute on the top-level plugin
>>> >>element
>>> >> >>>>to resolve the path, but that doesn't handle the case where
>>> >>different
>>> >> >>>>Java files will have different paths. I wonder if there are more
>>> >> >>>>complex
>>> >> >>>>plugins around we can try to convert to see where the pain points
>>> >>are.
>>> >> >>>>
>>> >> >>>>
>>> >> >>>> Adding the ability to modify existing parts of a native
>>>platform's
>>> >> >>>>config
>>> >> >>>> document to the <config-file> portion might be needed.. Although
>>> >>Ive
>>> >> >>>>yet
>>> >> >>>> to dig up a use case. Will dig around more.
>>> >> >>>>
>>> >> >>>> Agreed - also things like target OS/SDK versions may be
>>>required by
>>> >> >>>>certain plugins (i.e. this plugin uses an iOS 6 API, so we need
>>>to
>>> >> >>>>update your project to iOS 6). Probably the best approach there
>>>is
>>> >>to
>>> >> >>>>warn/prompt the user before proceeding.
>>> >> >>>>
>>> >> >>>> +1 agree that <resource-file> and <header-file> is redundant.
>>> >>Tooling
>>> >> >>>> should be able to distinguish this so merging with <source-file>
>>> >> >>>>makes a
>>> >> >>>> lot of sense.
>>> >> >>>>
>>> >> >>>> Looking good!
>>> >> >>>>
>>> >> >>>> On 6/8/12 6:40 PM, "Andrew Lunny"
>>> >> >>>><al...@gmail.com>> wrote:
>>> >> >>>>
>>> >> >>>>>Hi all,
>>> >> >>>>>
>>> >> >>>>>I've posted to this list before about pluginstall[1], the tool
>>>I've
>>> >> >>>>>developed as part of working on PhoneGap Build and requiring
>>> >> >>>>>programmatic
>>> >> >>>>>installation of Cordova plugins.
>>> >> >>>>>
>>> >> >>>>>I've now written up a spec for the format that pluginstall uses
>>>- I
>>> >> >>>>>think
>>> >> >>>>>it's generally useful for Cordova plugin installation and
>>> >> >>>>>manipulation.
>>> >> >>>>>The
>>> >> >>>>>spec is available on GitHub:
>>> >> >>>>>https://github.com/alunny/cordova-plugin-spec
>>> >> >>>>>
>>> >> >>>>>Issues and/or pull requests and/or forks welcome.
>>> >> >>>>>
>>> >> >>>>>Cheers,
>>> >> >>>>>Andrew
>>> >> >>>>>
>>> >> >>>>>[1] https://github.com/alunny/pluginstall
>>> >> >>>>
>>> >> >>>>
>>> >> >>
>>> >>
>>> >>
>>>
>>>
>

Re: Plugin Format and Spec

Posted by Jesse MacFadyen <pu...@gmail.com>.
Yes 0.8.x is stable, so we should be expecting more and more people to
move to it soon.

Cheers,
  Jesse

Sent from my iPhone5

On 2012-06-25, at 5:20 PM, Shazron <sh...@gmail.com> wrote:

> Talked to Brian and Anis.
>
> It was explained to me that even numbered versions are considered
> unstable, etc - so it's expected for devs to use a more stable
> version.
>
> I'm just considering the most common scenario - where people will
> download the latest node version 0.8 (regular dev users, not us)
>
> There's three approaches for us:
> 1. They downloaded 0.8 - tell them to downgrade, using
> https://github.com/isaacs/nave to 0.6
> 2. Upgrade our plugin to work with 0.8
> 3. Tell them to clean install 0.6 http://nodejs.org/dist/
>
> My thinking is #2 would be easiest for users, but if we are going with
> 0.6, we will have to document the steps etc for #1 and/or #3
>
> Shaz
>
> On Mon, Jun 25, 2012 at 4:52 PM, Shazron <sh...@gmail.com> wrote:
>> It's definitely a blocker IMO. 0.8 is the latest shipped version, and
>> it doesn't work with it.
>> Maybe you'll disagree, but users will.
>>
>> On Mon, Jun 25, 2012 at 4:36 PM, Filip Maj <fi...@adobe.com> wrote:
>>> Yep, 0.6.8.
>>>
>>> $ node -v
>>> v0.6.8
>>>
>>>
>>> On 6/25/12 4:32 PM, "Jesse" <pu...@gmail.com> wrote:
>>>
>>>> 0.6.8 ? Is your toaster unplugged Fil?
>>>> I am in windows and running without issue :
>>>> $ node -v => v0.6.18
>>>>
>>>>
>>>> On Mon, Jun 25, 2012 at 4:29 PM, Filip Maj <fi...@adobe.com> wrote:
>>>>
>>>>> I wouldn¹t call that a blocker..
>>>>>
>>>>> Pluginstall works fine with node 0.6.8 too.
>>>>>
>>>>> I was using 0.6.6, some dependencies in pluginstall require at least
>>>>> node
>>>>> 0.6.7, so I upgraded to 0.6.8. Works fine.
>>>>>
>>>>> On 6/25/12 3:59 PM, "Shazron" <sh...@gmail.com> wrote:
>>>>>
>>>>>> pluginstall blocker:
>>>>>> https://github.com/alunny/node-xcode/issues/3
>>>>>> https://issues.apache.org/jira/browse/CB-631
>>>>>>
>>>>>> Only works with node 0.6.17
>>>>>>
>>>>>>
>>>>>> On Mon, Jun 25, 2012 at 2:09 PM, Jesse <pu...@gmail.com> wrote:
>>>>>>> We could use an 'engine' type specification similar to npm :
>>>>>>> "engine": "node >= 0.4.1"
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>> http://blog.nodejs.org/2012/02/27/managing-node-js-dependencies-with-shri
>>>>>>> nkwrap/
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Jun 25, 2012 at 2:02 PM, Filip Maj <fi...@adobe.com> wrote:
>>>>>>>
>>>>>>>> Ideally, I would think we do NOT plan on doing that post-2.0. That
>>>>>>>> said,
>>>>>>>> our current deprecation policy, last I checked, was "6 months from
>>>>>>>> now",
>>>>>>>> which does not guarantee that the API will not change between minor
>>>>>>>> revisions.
>>>>>>>>
>>>>>>>> Thus, the conversation turns back to project versioning and
>>>>>>>> deprecation.
>>>>>>>>
>>>>>>>> Mike and I spoke about this this morning. I think both of us support
>>>>>>>> the
>>>>>>>> idea of moving to semantic versioning for 2.0 and beyond.
>>>>>>>>
>>>>>>>> On 6/25/12 1:45 PM, "Anis KADRI" <an...@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Agreed fil, but are we planning on doing that for future releases ?
>>>>>>>> If yes
>>>>>>>>> that YAH we should support versions and the solution you described
>>>>> is
>>>>>>>>> certainly an option. But if I were a plugin developer, I would not
>>>>>>>> want to
>>>>>>>>> update it every month to keep up with Cordova releases.
>>>>>>>>> I don't disagree that there could be an Cordova version in the
>>>>>>>> manifest
>>>>>>>>> file that allows plugin developers to target a specific version of
>>>>>>>> Cordova
>>>>>>>>> (which would mean that the plugin was tested with that version but
>>>>>>>> might
>>>>>>>>> also work with newer versions).
>>>>>>>>>
>>>>>>>>> On Mon, Jun 25, 2012 at 1:33 PM, Filip Maj <fi...@adobe.com> wrote:
>>>>>>>>>
>>>>>>>>>> Yes, it has changed every month. Pretty much every minor revision
>>>>>>>> from
>>>>>>>>>> 1.0
>>>>>>>>>> to 1.9 has changed the API (at least on Android).
>>>>>>>>>>
>>>>>>>>>> On 6/25/12 1:26 PM, "Anis KADRI" <an...@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Right but does the plugin interface change every month too ? A
>>>>>>>> plugin
>>>>>>>>>> that
>>>>>>>>>>> works with Cordova 1.x.x is not supposed to work with Cordova
>>>>>>>> 1.y.y ?
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Jun 25, 2012 at 1:18 PM, Filip Maj <fi...@adobe.com>
>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> You don't see any reason why plugins should support different
>>>>>>>>>> versions
>>>>>>>>>>>> of
>>>>>>>>>>>> cordova? Cordova gets released every month. This seems like a
>>>>>>>> pretty
>>>>>>>>>>>> important thing to figure out IMO
>>>>>>>>>>>>
>>>>>>>>>>>> On 6/25/12 1:12 PM, "Anis KADRI" <an...@gmail.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> I think we should agree on a spec (plugin package and plugin
>>>>>>>>>> interface)
>>>>>>>>>>>>> and
>>>>>>>>>>>>> stick to it. As long as we don't break the plugin interface,
>>>>> I
>>>>>>>> don't
>>>>>>>>>>>> see
>>>>>>>>>>>>> any reason why plugins should support multiple versions of
>>>>>>>> Cordova.
>>>>>>>>>> If
>>>>>>>>>>>>> there are any, I'd love to hear them.
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Mon, Jun 25, 2012 at 1:01 PM, Filip Maj <fi...@adobe.com>
>>>>>>>> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Back onto the versioning question..
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> 1. Do we want to support different version of the cordova
>>>>>>>>>> framework
>>>>>>>>>>>> in
>>>>>>>>>>>>>> plugins, within a single repo, across versions that changed
>>>>>>>> the
>>>>>>>>>>>>>> native/javascript plugin API?
>>>>>>>>>>>>>> 2. How?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> If the answer to (1) is yes, one idea for (2) might be
>>>>> nesting
>>>>>>>>>>>> another
>>>>>>>>>>>>>> directory level in the all of the source directories that
>>>>>>>> contains
>>>>>>>>>>>> the
>>>>>>>>>>>>>> version number supported. For example:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> src/android/1.5.0/*.java
>>>>>>>>>>>>>> src/android/1.8.1/*.java
>>>>>>>>>>>>>> www/1.5.0/childbrowser.js
>>>>>>>>>>>>>> www/1.8.1/childbrowser.js
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Could get gnarly real quick though. Another, cleaner
>>>>>>>>>> implementation
>>>>>>>>>>>> in
>>>>>>>>>>>>>> terms of file system "noise" might be to employ a git
>>>>> branches
>>>>>>>>>>>>>> convention.. But that would enforce a git dependency.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Just brainstorming / thinking out loud. Both are probably
>>>>> bad
>>>>>>>>>> ideas
>>>>>>>>>>>> :)
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On 6/25/12 11:41 AM, "Michael Brooks"
>>>>>>>> <mi...@michaelbrooks.ca>
>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> We may also want to describe testing from JavaScript and
>>>>>>>> Native.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I would also like to see a repository called
>>>>>>>>>>>> "cordova-plugin-template"
>>>>>>>>>>>>>>> that
>>>>>>>>>>>>>>> is a boilerplate to start writing any plugin. The idea is
>>>>>>>> that
>>>>>>>>>> users
>>>>>>>>>>>>>> start
>>>>>>>>>>>>>>> with something that works, with tests, and documentation
>>>>>>>>>>>> boilerplate -
>>>>>>>>>>>>>>> perhaps it can be an echo plugin since that has a minimal
>>>>>>>>>> footprint.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Mon, Jun 25, 2012 at 11:28 AM, Filip Maj
>>>>> <fi...@adobe.com>
>>>>>>>>>> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Looks great. I'll add some detail to the list you have
>>>>>>>> here.
>>>>>>>>>> I'd
>>>>>>>>>>>>>>>> recommend
>>>>>>>>>>>>>>>> tweaking the order a little bit; introducing the JS
>>>>> before
>>>>>>>> the
>>>>>>>>>>>> native
>>>>>>>>>>>>>>>> APIs.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> # Plugin Author Guide
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> - plugin package format -> points to Andrew's plugin
>>>>> spec
>>>>>>>>>>>>>>>> - js api
>>>>>>>>>>>>>>>> --- basically documenting exec(). Service, action,
>>>>>>>> callbacks,
>>>>>>>>>>>>>> arguments.
>>>>>>>>>>>>>>>> What about how arguments are translated from JS types
>>>>>>>> (string,
>>>>>>>>>>>>>> number,
>>>>>>>>>>>>>>>> objects, etc) to native types for each platform?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> - native api
>>>>>>>>>>>>>>>> --- ios
>>>>>>>>>>>>>>>> --- android
>>>>>>>>>>>>>>>> --- blackberry
>>>>>>>>>>>>>>>> --- windowsphone
>>>>>>>>>>>>>>>> --- bada
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On 6/25/12 11:16 AM, "Brian LeRoux" <b...@brian.io> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Biggest question is how to document. My thinking is
>>>>> that
>>>>>>>> we
>>>>>>>>>> want
>>>>>>>>>>>> to
>>>>>>>>>>>>>>>>> specify the PluginPackage so that PluginInstall works.
>>>>> So
>>>>>>>> the
>>>>>>>>>>>> docs
>>>>>>>>>>>>>>>>> would read like this:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> # Plugin Author Guide
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> - plugin package format
>>>>>>>>>>>>>>>>> - native api
>>>>>>>>>>>>>>>>> --- ios
>>>>>>>>>>>>>>>>> --- android
>>>>>>>>>>>>>>>>> --- blackberry
>>>>>>>>>>>>>>>>> --- windowsphone
>>>>>>>>>>>>>>>>> --- bada
>>>>>>>>>>>>>>>>> - js api
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Thoughts? (If this looks good I will update the issue.)
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> On Mon, Jun 25, 2012 at 10:50 AM, Filip Maj
>>>>>>>> <fi...@adobe.com>
>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>>>>> Hah Michael and I were just talking about that..
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> I will send a pull request to Andrew's draft spec
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> On 6/25/12 10:46 AM, "Brian LeRoux" <b...@brian.io>
>>>>> wrote:
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> npm does this w/ an 'engines' attribute on
>>>>> package.json
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> On Mon, Jun 25, 2012 at 10:26 AM, Filip Maj
>>>>>>>> <fi...@adobe.com>
>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>>>>>>> One more thing that came to mind is how to support
>>>>>>>>>> different
>>>>>>>>>>>>>>>> versions
>>>>>>>>>>>>>>>>>>>> of Cordova? Any ideas?
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> From: Andrew Lunny
>>>>>>>>>>>> <al...@gmail.com>>
>>>>>>>>>>>>>>>>>>>> Reply-To:
>>>>> "alunny@gmail.com<ma...@gmail.com>"
>>>>>>>>>>>>>>>>>>>> <al...@gmail.com>>
>>>>>>>>>>>>>>>>>>>> To: Default User Nam
>>>>>>>> <fil@adobe.com<mailto:fil@adobe.com
>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> Cc:
>>>>>>>>>>>>>>>>>>>> "callback-dev@incubator.apache.org<mailto:
>>>>>>>>>>>>>>>> callback-dev@incubator.apache
>>>>>>>>>>>>>>>>>>>> .o
>>>>>>>>>>>>>>>>>>>> rg>"
>>>>>>>>>>>>>>>>>>>> <callback-dev@incubator.apache.org<mailto:
>>>>>>>>>>>>>>>> callback-dev@incubator.apache
>>>>>>>>>>>>>>>>>>>> .o
>>>>>>>>>>>>>>>>>>>> rg>>
>>>>>>>>>>>>>>>>>>>> Subject: Re: Plugin Format and Spec
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> On 11 June 2012 13:50, Filip Maj
>>>>>>>>>>>>>>>> <fil@adobe.com<mailto:fil@adobe.com
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>>>>>>> Nice work Andrew! I suggest taking this and moving
>>>>> to
>>>>>>>> a
>>>>>>>>>>>> cordova
>>>>>>>>>>>>>>>> wiki
>>>>>>>>>>>>>>>>>>>> page
>>>>>>>>>>>>>>>>>>>> (assuming all committers are on board to adopting
>>>>>>>> this as
>>>>>>>>>> the
>>>>>>>>>>>>>> basis
>>>>>>>>>>>>>>>>>>>> for
>>>>>>>>>>>>>>>>>>>> a
>>>>>>>>>>>>>>>>>>>> plugin spec)
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> A link on the Cordova wiki is probably the best
>>>>> place
>>>>>>>> to
>>>>>>>>>>>> start
>>>>>>>>>>>>>> - we
>>>>>>>>>>>>>>>>>>>> can
>>>>>>>>>>>>>>>>>>>> get some more feedback from plugin authors and app
>>>>>>>>>> developers
>>>>>>>>>>>>>> (i.e.
>>>>>>>>>>>>>>>>>>>> keep
>>>>>>>>>>>>>>>>>>>> this as "a way to write plugins" rather than "the
>>>>>>>> official
>>>>>>>>>>>> way to
>>>>>>>>>>>>>>>> write
>>>>>>>>>>>>>>>>>>>> plugins").
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> Is target-dir necessary for the <source-file>
>>>>>>>> element? For
>>>>>>>>>>>> Java
>>>>>>>>>>>>>>>> files,
>>>>>>>>>>>>>>>>>>>> the
>>>>>>>>>>>>>>>>>>>> tooling could take a peak inside the .java file and
>>>>>>>>>> extract
>>>>>>>>>>>> out
>>>>>>>>>>>>>> the
>>>>>>>>>>>>>>>>>>>> package name from the file, no? Phonegap build
>>>>> already
>>>>>>>>>> does
>>>>>>>>>>>> this
>>>>>>>>>>>>>>>>>>>> doesn't
>>>>>>>>>>>>>>>>>>>> it?
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> PhoneGap Build did do this, but no longer supports
>>>>>>>>>> uploading
>>>>>>>>>>>>>>>> arbitrary
>>>>>>>>>>>>>>>>>>>> Java files. Only plugins with a manifest are
>>>>> supported.
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> I'm torn - one of the goals of this format is to
>>>>> make
>>>>>>>> it
>>>>>>>>>> as
>>>>>>>>>>>>>> easy as
>>>>>>>>>>>>>>>>>>>> possible to write tools that use it as possible.
>>>>> Right
>>>>>>>>>> now, a
>>>>>>>>>>>>>> tool
>>>>>>>>>>>>>>>>>>>> reads
>>>>>>>>>>>>>>>>>>>> one file (plugin.xml) and moves source files
>>>>> (ignoring
>>>>>>>>>> config
>>>>>>>>>>>>>> files
>>>>>>>>>>>>>>>> for
>>>>>>>>>>>>>>>>>>>> the moment). I'd prefer it wasn't "read one file,
>>>>> then
>>>>>>>> read
>>>>>>>>>>>> each
>>>>>>>>>>>>>>>> .java
>>>>>>>>>>>>>>>>>>>> file to discover where to move it".
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> One option is to use the id attribute on the
>>>>> top-level
>>>>>>>>>> plugin
>>>>>>>>>>>>>>>> element
>>>>>>>>>>>>>>>>>>>> to resolve the path, but that doesn't handle the
>>>>> case
>>>>>>>> where
>>>>>>>>>>>>>>>> different
>>>>>>>>>>>>>>>>>>>> Java files will have different paths. I wonder if
>>>>>>>> there are
>>>>>>>>>>>> more
>>>>>>>>>>>>>>>>>>>> complex
>>>>>>>>>>>>>>>>>>>> plugins around we can try to convert to see where
>>>>> the
>>>>>>>> pain
>>>>>>>>>>>> points
>>>>>>>>>>>>>>>> are.
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> Adding the ability to modify existing parts of a
>>>>>>>> native
>>>>>>>>>>>>>> platform's
>>>>>>>>>>>>>>>>>>>> config
>>>>>>>>>>>>>>>>>>>> document to the <config-file> portion might be
>>>>>>>> needed..
>>>>>>>>>>>> Although
>>>>>>>>>>>>>>>> Ive
>>>>>>>>>>>>>>>>>>>> yet
>>>>>>>>>>>>>>>>>>>> to dig up a use case. Will dig around more.
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> Agreed - also things like target OS/SDK versions
>>>>> may
>>>>>>>> be
>>>>>>>>>>>>>> required by
>>>>>>>>>>>>>>>>>>>> certain plugins (i.e. this plugin uses an iOS 6 API,
>>>>>>>> so we
>>>>>>>>>>>> need
>>>>>>>>>>>>>> to
>>>>>>>>>>>>>>>>>>>> update your project to iOS 6). Probably the best
>>>>>>>> approach
>>>>>>>>>>>> there
>>>>>>>>>>>>>> is
>>>>>>>>>>>>>>>> to
>>>>>>>>>>>>>>>>>>>> warn/prompt the user before proceeding.
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> +1 agree that <resource-file> and <header-file> is
>>>>>>>>>> redundant.
>>>>>>>>>>>>>>>> Tooling
>>>>>>>>>>>>>>>>>>>> should be able to distinguish this so merging with
>>>>>>>>>>>> <source-file>
>>>>>>>>>>>>>>>>>>>> makes a
>>>>>>>>>>>>>>>>>>>> lot of sense.
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> Looking good!
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> On 6/8/12 6:40 PM, "Andrew Lunny"
>>>>>>>>>>>>>>>>>>>> <al...@gmail.com>> wrote:
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> Hi all,
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> I've posted to this list before about
>>>>> pluginstall[1],
>>>>>>>> the
>>>>>>>>>>>> tool
>>>>>>>>>>>>>> I've
>>>>>>>>>>>>>>>>>>>>> developed as part of working on PhoneGap Build and
>>>>>>>>>> requiring
>>>>>>>>>>>>>>>>>>>>> programmatic
>>>>>>>>>>>>>>>>>>>>> installation of Cordova plugins.
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> I've now written up a spec for the format that
>>>>>>>> pluginstall
>>>>>>>>>>>> uses
>>>>>>>>>>>>>> - I
>>>>>>>>>>>>>>>>>>>>> think
>>>>>>>>>>>>>>>>>>>>> it's generally useful for Cordova plugin
>>>>> installation
>>>>>>>> and
>>>>>>>>>>>>>>>>>>>>> manipulation.
>>>>>>>>>>>>>>>>>>>>> The
>>>>>>>>>>>>>>>>>>>>> spec is available on GitHub:
>>>>>>>>>>>>>>>>>>>>> https://github.com/alunny/cordova-plugin-spec
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> Issues and/or pull requests and/or forks welcome.
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> Cheers,
>>>>>>>>>>>>>>>>>>>>> Andrew
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> [1] https://github.com/alunny/pluginstall
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> @purplecabbage
>>>>>>> risingj.com
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> @purplecabbage
>>>> risingj.com
>>>

Re: Plugin Format and Spec

Posted by Ally Ogilvie <ao...@wizcorp.jp>.
Yup 1.1 is outdated, I wanted to give you guys structure example with both
Android and iOS in the repo.

For Cordova goodness look at 1.7
https://github.com/Wizcorp/phonegap-plugin-wizViewManager/tree/v1.7
(same repo diff branch - see before post on versioning)

While we are in development we usually make a local fork of the repo and
merge in so the repo has stable branches matching each Cordova version (coz
we know you guys love those rolling releases! :p )

That way, if we make a project based on Cordova 1.8 we can;
a) know what plugins are supported with our choice of Cordova (if the
branch number exists or not)
b) quickly pull in a version of the right plugin that matches our Cordova
version.

There are a lot of reasons for the above type structure but the main was we
looked at the "official" plugin repo, and plugins were separated by
platform which confused us a lot... if cross-platform scripting is the goal
I want to see plugin first, support platforms inside (sub dir or whatever).

for WizViewManager...
Looking at the PG 1.1 repo (and also mainViewController.m for CDV 1.7) if
we can get the shouldStartLoadWithRequest into the plugin.m for example
that would be awesome using CDV webView delegate or something.



On Wed, Jun 27, 2012 at 4:50 AM, Shazron <sh...@gmail.com> wrote:

> Great - also, there is an undocumented way to handle "unknown" schemes
> that your plugin can hook into, which is even better:
>
> 1.
> https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVLocalStorage.m#L319-342
> 2.
> https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVPlugin.m#L49
> 3.
> https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVPlugin.m#L103-112
>
> But of course, this scheme must _not_ be in use by any other app (I
> would add some guid in there)
>
>
> On Tue, Jun 26, 2012 at 12:43 PM, Andrew Lunny <al...@gmail.com> wrote:
> > Ah okay - I was referring to this plugin referenced upthread:
> > https://github.com/Wizcorp/phonegap-plugin-wizViewManager/tree/v1.1
> > specifically this code:
> >
> https://github.com/Wizcorp/phonegap-plugin-wizViewManager/blob/v1.1/ios/project/Classes/AppDelegate.m
> >
> > That code looks a little outdated (pre Cordova rename); if there's a
> better
> > way to achieve the same goal, awesome.
> >
> >
> > On 26 June 2012 12:34, Shazron <sh...@gmail.com> wrote:
> >>
> >> Thanks for the fix Andrew!
> >>
> >> Not sure what you are referring to regarding
> >> shouldStartLoadWithRequest -- this does not occur in the AppDelegate
> >> anymore (the app delegate does not implement the UIWebDelegate
> >> interface). This is handled in the CDVViewController - which in the
> >> app template, your MainViewController subclasses.
> >>
> >> Even so, I'm not sure why plugins need to hook into this? If they do,
> >> since all plugins have access to the UIWebView, they can "override"
> >> the UIWebViewDelegate from the webView.delegate property, like how I
> >> did it for the iOS 5.1 localStorage fix (and forward the message on,
> >> etc):
> >>
> >> 1.
> >>
> https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVLocalStorage.m#L102
> >> 2.
> >>
> https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVLocalStorage.m#L319-342
> >>
> >> On Tue, Jun 26, 2012 at 12:10 PM, Andrew Lunny <al...@gmail.com>
> wrote:
> >> > Re node 0.8: package.json is updated in version 0.3.4. All can
> rejoice.
> >> >
> >> > Re speccing engine versions: I commented on Fil's pull request. It's
> >> > mostly
> >> > all good.
> >> >
> >> > @Ally - looking at that repo, the only thing you're doing that's not
> >> > supported in the current version of the spec is modifying the
> >> > AppDelegate
> >> > class (the shouldStartLoadWithRequest method). I wonder what the best
> >> > way
> >> > to do that programmatically would be - any thoughts Shaz? Perhaps
> have a
> >> > delegate of the app delegate that plugins can hook into?
> >> >
> >> > On 25 June 2012 19:08, Ally Ogilvie <ao...@wizcorp.jp> wrote:
> >> >
> >> >> Hi All :)
> >> >>
> >> >> Our current build hub at Wizcorp has plugins in separate repos
> already.
> >> >> Each plugin repo is version branched.
> >> >> We have a config for each project which contains required plugin name
> >> >> (matching repo) and versions (as well as many other things).
> >> >> We clone each plugin repo from branch = version recursively and
> inject
> >> >> code
> >> >> or xml/plist data where necessary.
> >> >>
> >> >> I'd really like to sync the structure you guys have as most likely
> >> >> people
> >> >> will use your format as de facto for setting up plugin repos ;)
> >> >> Also, @ https://github.com/alunny/cordova-plugin-spec
> >> >> ^ I noticed your happy to dump all your HTML in www dir. I suggest
> sub
> >> >> dirs
> >> >> as some developers dont want a 100 files at root www.
> >> >> maybe;
> >> >>
> >> >> www/phonegap/js/cordova.js
> >> >> www/phonegap/plugins/yourPluginName/plugin1.js
> >> >> www/phonegap/plugins/yourPluginName/plugin2.js
> >> >>
> >> >> our full repo setup is as such;
> >> >> https://github.com/Wizcorp/phonegap-plugin-wizViewManager/tree/v1.1
> >> >>
> >> >> Thanks!
> >> >>
> >> >> On Tue, Jun 26, 2012 at 9:50 AM, Shazron <sh...@gmail.com> wrote:
> >> >>
> >> >> > Anis can chime in - he was testing with it and reported the error.
> I
> >> >> > believe the error was in the parser functionality in that module (I
> >> >> > assume in parsing the .xcodeproj file).
> >> >> >
> >> >> > On Mon, Jun 25, 2012 at 5:31 PM, Patrick Mueller <
> pmuellr@gmail.com>
> >> >> > wrote:
> >> >> > > On Mon, Jun 25, 2012 at 8:19 PM, Shazron <sh...@gmail.com>
> wrote:
> >> >> > >
> >> >> > >> It was explained to me that even numbered versions are
> considered
> >> >> > >> unstable
> >> >> > >>
> >> >> > >
> >> >> > > Even numbered versions are stable - 0.6.x, 0.8.x; odd versions
> >> >> > > aren't
> >> >> > > stable - 0.7.x, etc;
> >> >> > >
> >> >> > >
> >> >> > >
> >> >> >
> >> >>
> >> >>
> http://en.wikipedia.org/wiki/Software_versioning#Odd-numbered%5Fversions%5Ffor%5Fdevelopment%5Freleases
> >> >> > >
> >> >> > > Isn't this just a matter of removing
> >> >> > >
> >> >> > > "engines": {
> >> >> > >    "node": "~0.6.7"
> >> >> > >  }
> >> >> > >
> >> >> > >
> >> >> > > from the package.json?  Or is there really some reason we need
> >> >> > > this?
> >> >> > >
> >> >> > > --
> >> >> > > Patrick Mueller
> >> >> > > http://muellerware.org
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Ally Ogilvie
> >> >> Lead Developer [ iOS, Android ]
> >> >> Mobile Devices
> >> >>
> >> >> [image:
> >> >>
> >> >>
> >> >>
> http://www.wizcorp.jp/wp-content/themes/business-lite/images/all/wizcorp-logo.png
> >> >> ]
> >> >>
> >> >> 3-10-14-6F Higashi Nihombashi,
> >> >> Chuo-ku
> >> >> 103-0004, Tokyo
> >> >> Tel: (+81)3-4550-1448
> >> >> E-mail: aogilvie@wizcorp.jp
> >> >>
> >
> >
>



-- 
Ally Ogilvie
Developer [ iOS, Android ]
Mobile Devices

[image:
http://www.wizcorp.jp/wp-content/themes/business-lite/images/all/wizcorp-logo.png]

3-10-14-6F Higashi Nihombashi,
Chuo-ku
103-0004, Tokyo
Tel: (+81)3-4550-1448
E-mail: aogilvie@wizcorp.jp

Re: Plugin Format and Spec

Posted by Shazron <sh...@gmail.com>.
Great - also, there is an undocumented way to handle "unknown" schemes
that your plugin can hook into, which is even better:

1. https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVLocalStorage.m#L319-342
2. https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVPlugin.m#L49
3. https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVPlugin.m#L103-112

But of course, this scheme must _not_ be in use by any other app (I
would add some guid in there)


On Tue, Jun 26, 2012 at 12:43 PM, Andrew Lunny <al...@gmail.com> wrote:
> Ah okay - I was referring to this plugin referenced upthread:
> https://github.com/Wizcorp/phonegap-plugin-wizViewManager/tree/v1.1
> specifically this code:
> https://github.com/Wizcorp/phonegap-plugin-wizViewManager/blob/v1.1/ios/project/Classes/AppDelegate.m
>
> That code looks a little outdated (pre Cordova rename); if there's a better
> way to achieve the same goal, awesome.
>
>
> On 26 June 2012 12:34, Shazron <sh...@gmail.com> wrote:
>>
>> Thanks for the fix Andrew!
>>
>> Not sure what you are referring to regarding
>> shouldStartLoadWithRequest -- this does not occur in the AppDelegate
>> anymore (the app delegate does not implement the UIWebDelegate
>> interface). This is handled in the CDVViewController - which in the
>> app template, your MainViewController subclasses.
>>
>> Even so, I'm not sure why plugins need to hook into this? If they do,
>> since all plugins have access to the UIWebView, they can "override"
>> the UIWebViewDelegate from the webView.delegate property, like how I
>> did it for the iOS 5.1 localStorage fix (and forward the message on,
>> etc):
>>
>> 1.
>> https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVLocalStorage.m#L102
>> 2.
>> https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVLocalStorage.m#L319-342
>>
>> On Tue, Jun 26, 2012 at 12:10 PM, Andrew Lunny <al...@gmail.com> wrote:
>> > Re node 0.8: package.json is updated in version 0.3.4. All can rejoice.
>> >
>> > Re speccing engine versions: I commented on Fil's pull request. It's
>> > mostly
>> > all good.
>> >
>> > @Ally - looking at that repo, the only thing you're doing that's not
>> > supported in the current version of the spec is modifying the
>> > AppDelegate
>> > class (the shouldStartLoadWithRequest method). I wonder what the best
>> > way
>> > to do that programmatically would be - any thoughts Shaz? Perhaps have a
>> > delegate of the app delegate that plugins can hook into?
>> >
>> > On 25 June 2012 19:08, Ally Ogilvie <ao...@wizcorp.jp> wrote:
>> >
>> >> Hi All :)
>> >>
>> >> Our current build hub at Wizcorp has plugins in separate repos already.
>> >> Each plugin repo is version branched.
>> >> We have a config for each project which contains required plugin name
>> >> (matching repo) and versions (as well as many other things).
>> >> We clone each plugin repo from branch = version recursively and inject
>> >> code
>> >> or xml/plist data where necessary.
>> >>
>> >> I'd really like to sync the structure you guys have as most likely
>> >> people
>> >> will use your format as de facto for setting up plugin repos ;)
>> >> Also, @ https://github.com/alunny/cordova-plugin-spec
>> >> ^ I noticed your happy to dump all your HTML in www dir. I suggest sub
>> >> dirs
>> >> as some developers dont want a 100 files at root www.
>> >> maybe;
>> >>
>> >> www/phonegap/js/cordova.js
>> >> www/phonegap/plugins/yourPluginName/plugin1.js
>> >> www/phonegap/plugins/yourPluginName/plugin2.js
>> >>
>> >> our full repo setup is as such;
>> >> https://github.com/Wizcorp/phonegap-plugin-wizViewManager/tree/v1.1
>> >>
>> >> Thanks!
>> >>
>> >> On Tue, Jun 26, 2012 at 9:50 AM, Shazron <sh...@gmail.com> wrote:
>> >>
>> >> > Anis can chime in - he was testing with it and reported the error. I
>> >> > believe the error was in the parser functionality in that module (I
>> >> > assume in parsing the .xcodeproj file).
>> >> >
>> >> > On Mon, Jun 25, 2012 at 5:31 PM, Patrick Mueller <pm...@gmail.com>
>> >> > wrote:
>> >> > > On Mon, Jun 25, 2012 at 8:19 PM, Shazron <sh...@gmail.com> wrote:
>> >> > >
>> >> > >> It was explained to me that even numbered versions are considered
>> >> > >> unstable
>> >> > >>
>> >> > >
>> >> > > Even numbered versions are stable - 0.6.x, 0.8.x; odd versions
>> >> > > aren't
>> >> > > stable - 0.7.x, etc;
>> >> > >
>> >> > >
>> >> > >
>> >> >
>> >>
>> >> http://en.wikipedia.org/wiki/Software_versioning#Odd-numbered%5Fversions%5Ffor%5Fdevelopment%5Freleases
>> >> > >
>> >> > > Isn't this just a matter of removing
>> >> > >
>> >> > > "engines": {
>> >> > >    "node": "~0.6.7"
>> >> > >  }
>> >> > >
>> >> > >
>> >> > > from the package.json?  Or is there really some reason we need
>> >> > > this?
>> >> > >
>> >> > > --
>> >> > > Patrick Mueller
>> >> > > http://muellerware.org
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Ally Ogilvie
>> >> Lead Developer [ iOS, Android ]
>> >> Mobile Devices
>> >>
>> >> [image:
>> >>
>> >>
>> >> http://www.wizcorp.jp/wp-content/themes/business-lite/images/all/wizcorp-logo.png
>> >> ]
>> >>
>> >> 3-10-14-6F Higashi Nihombashi,
>> >> Chuo-ku
>> >> 103-0004, Tokyo
>> >> Tel: (+81)3-4550-1448
>> >> E-mail: aogilvie@wizcorp.jp
>> >>
>
>

Re: Plugin Format and Spec

Posted by Andrew Lunny <al...@gmail.com>.
Ah okay - I was referring to this plugin referenced upthread:
https://github.com/Wizcorp/phonegap-plugin-wizViewManager/tree/v1.1
specifically this code:
https://github.com/Wizcorp/phonegap-plugin-wizViewManager/blob/v1.1/ios/project/Classes/AppDelegate.m

That code looks a little outdated (pre Cordova rename); if there's a better
way to achieve the same goal, awesome.

On 26 June 2012 12:34, Shazron <sh...@gmail.com> wrote:

> Thanks for the fix Andrew!
>
> Not sure what you are referring to regarding
> shouldStartLoadWithRequest -- this does not occur in the AppDelegate
> anymore (the app delegate does not implement the UIWebDelegate
> interface). This is handled in the CDVViewController - which in the
> app template, your MainViewController subclasses.
>
> Even so, I'm not sure why plugins need to hook into this? If they do,
> since all plugins have access to the UIWebView, they can "override"
> the UIWebViewDelegate from the webView.delegate property, like how I
> did it for the iOS 5.1 localStorage fix (and forward the message on,
> etc):
>
> 1.
> https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVLocalStorage.m#L102
> 2.
> https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVLocalStorage.m#L319-342
>
> On Tue, Jun 26, 2012 at 12:10 PM, Andrew Lunny <al...@gmail.com> wrote:
> > Re node 0.8: package.json is updated in version 0.3.4. All can rejoice.
> >
> > Re speccing engine versions: I commented on Fil's pull request. It's
> mostly
> > all good.
> >
> > @Ally - looking at that repo, the only thing you're doing that's not
> > supported in the current version of the spec is modifying the AppDelegate
> > class (the shouldStartLoadWithRequest method). I wonder what the best way
> > to do that programmatically would be - any thoughts Shaz? Perhaps have a
> > delegate of the app delegate that plugins can hook into?
> >
> > On 25 June 2012 19:08, Ally Ogilvie <ao...@wizcorp.jp> wrote:
> >
> >> Hi All :)
> >>
> >> Our current build hub at Wizcorp has plugins in separate repos already.
> >> Each plugin repo is version branched.
> >> We have a config for each project which contains required plugin name
> >> (matching repo) and versions (as well as many other things).
> >> We clone each plugin repo from branch = version recursively and inject
> code
> >> or xml/plist data where necessary.
> >>
> >> I'd really like to sync the structure you guys have as most likely
> people
> >> will use your format as de facto for setting up plugin repos ;)
> >> Also, @ https://github.com/alunny/cordova-plugin-spec
> >> ^ I noticed your happy to dump all your HTML in www dir. I suggest sub
> dirs
> >> as some developers dont want a 100 files at root www.
> >> maybe;
> >>
> >> www/phonegap/js/cordova.js
> >> www/phonegap/plugins/yourPluginName/plugin1.js
> >> www/phonegap/plugins/yourPluginName/plugin2.js
> >>
> >> our full repo setup is as such;
> >> https://github.com/Wizcorp/phonegap-plugin-wizViewManager/tree/v1.1
> >>
> >> Thanks!
> >>
> >> On Tue, Jun 26, 2012 at 9:50 AM, Shazron <sh...@gmail.com> wrote:
> >>
> >> > Anis can chime in - he was testing with it and reported the error. I
> >> > believe the error was in the parser functionality in that module (I
> >> > assume in parsing the .xcodeproj file).
> >> >
> >> > On Mon, Jun 25, 2012 at 5:31 PM, Patrick Mueller <pm...@gmail.com>
> >> > wrote:
> >> > > On Mon, Jun 25, 2012 at 8:19 PM, Shazron <sh...@gmail.com> wrote:
> >> > >
> >> > >> It was explained to me that even numbered versions are considered
> >> > >> unstable
> >> > >>
> >> > >
> >> > > Even numbered versions are stable - 0.6.x, 0.8.x; odd versions
> aren't
> >> > > stable - 0.7.x, etc;
> >> > >
> >> > >
> >> > >
> >> >
> >>
> http://en.wikipedia.org/wiki/Software_versioning#Odd-numbered%5Fversions%5Ffor%5Fdevelopment%5Freleases
> >> > >
> >> > > Isn't this just a matter of removing
> >> > >
> >> > > "engines": {
> >> > >    "node": "~0.6.7"
> >> > >  }
> >> > >
> >> > >
> >> > > from the package.json?  Or is there really some reason we need this?
> >> > >
> >> > > --
> >> > > Patrick Mueller
> >> > > http://muellerware.org
> >> >
> >>
> >>
> >>
> >> --
> >> Ally Ogilvie
> >> Lead Developer [ iOS, Android ]
> >> Mobile Devices
> >>
> >> [image:
> >>
> >>
> http://www.wizcorp.jp/wp-content/themes/business-lite/images/all/wizcorp-logo.png
> >> ]
> >>
> >> 3-10-14-6F Higashi Nihombashi,
> >> Chuo-ku
> >> 103-0004, Tokyo
> >> Tel: (+81)3-4550-1448
> >> E-mail: aogilvie@wizcorp.jp
> >>
>

Re: Plugin Format and Spec

Posted by Shazron <sh...@gmail.com>.
Thanks for the fix Andrew!

Not sure what you are referring to regarding
shouldStartLoadWithRequest -- this does not occur in the AppDelegate
anymore (the app delegate does not implement the UIWebDelegate
interface). This is handled in the CDVViewController - which in the
app template, your MainViewController subclasses.

Even so, I'm not sure why plugins need to hook into this? If they do,
since all plugins have access to the UIWebView, they can "override"
the UIWebViewDelegate from the webView.delegate property, like how I
did it for the iOS 5.1 localStorage fix (and forward the message on,
etc):

1. https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVLocalStorage.m#L102
2. https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVLocalStorage.m#L319-342

On Tue, Jun 26, 2012 at 12:10 PM, Andrew Lunny <al...@gmail.com> wrote:
> Re node 0.8: package.json is updated in version 0.3.4. All can rejoice.
>
> Re speccing engine versions: I commented on Fil's pull request. It's mostly
> all good.
>
> @Ally - looking at that repo, the only thing you're doing that's not
> supported in the current version of the spec is modifying the AppDelegate
> class (the shouldStartLoadWithRequest method). I wonder what the best way
> to do that programmatically would be - any thoughts Shaz? Perhaps have a
> delegate of the app delegate that plugins can hook into?
>
> On 25 June 2012 19:08, Ally Ogilvie <ao...@wizcorp.jp> wrote:
>
>> Hi All :)
>>
>> Our current build hub at Wizcorp has plugins in separate repos already.
>> Each plugin repo is version branched.
>> We have a config for each project which contains required plugin name
>> (matching repo) and versions (as well as many other things).
>> We clone each plugin repo from branch = version recursively and inject code
>> or xml/plist data where necessary.
>>
>> I'd really like to sync the structure you guys have as most likely people
>> will use your format as de facto for setting up plugin repos ;)
>> Also, @ https://github.com/alunny/cordova-plugin-spec
>> ^ I noticed your happy to dump all your HTML in www dir. I suggest sub dirs
>> as some developers dont want a 100 files at root www.
>> maybe;
>>
>> www/phonegap/js/cordova.js
>> www/phonegap/plugins/yourPluginName/plugin1.js
>> www/phonegap/plugins/yourPluginName/plugin2.js
>>
>> our full repo setup is as such;
>> https://github.com/Wizcorp/phonegap-plugin-wizViewManager/tree/v1.1
>>
>> Thanks!
>>
>> On Tue, Jun 26, 2012 at 9:50 AM, Shazron <sh...@gmail.com> wrote:
>>
>> > Anis can chime in - he was testing with it and reported the error. I
>> > believe the error was in the parser functionality in that module (I
>> > assume in parsing the .xcodeproj file).
>> >
>> > On Mon, Jun 25, 2012 at 5:31 PM, Patrick Mueller <pm...@gmail.com>
>> > wrote:
>> > > On Mon, Jun 25, 2012 at 8:19 PM, Shazron <sh...@gmail.com> wrote:
>> > >
>> > >> It was explained to me that even numbered versions are considered
>> > >> unstable
>> > >>
>> > >
>> > > Even numbered versions are stable - 0.6.x, 0.8.x; odd versions aren't
>> > > stable - 0.7.x, etc;
>> > >
>> > >
>> > >
>> >
>> http://en.wikipedia.org/wiki/Software_versioning#Odd-numbered%5Fversions%5Ffor%5Fdevelopment%5Freleases
>> > >
>> > > Isn't this just a matter of removing
>> > >
>> > > "engines": {
>> > >    "node": "~0.6.7"
>> > >  }
>> > >
>> > >
>> > > from the package.json?  Or is there really some reason we need this?
>> > >
>> > > --
>> > > Patrick Mueller
>> > > http://muellerware.org
>> >
>>
>>
>>
>> --
>> Ally Ogilvie
>> Lead Developer [ iOS, Android ]
>> Mobile Devices
>>
>> [image:
>>
>> http://www.wizcorp.jp/wp-content/themes/business-lite/images/all/wizcorp-logo.png
>> ]
>>
>> 3-10-14-6F Higashi Nihombashi,
>> Chuo-ku
>> 103-0004, Tokyo
>> Tel: (+81)3-4550-1448
>> E-mail: aogilvie@wizcorp.jp
>>

Re: Plugin Format and Spec

Posted by Andrew Lunny <al...@gmail.com>.
Re node 0.8: package.json is updated in version 0.3.4. All can rejoice.

Re speccing engine versions: I commented on Fil's pull request. It's mostly
all good.

@Ally - looking at that repo, the only thing you're doing that's not
supported in the current version of the spec is modifying the AppDelegate
class (the shouldStartLoadWithRequest method). I wonder what the best way
to do that programmatically would be - any thoughts Shaz? Perhaps have a
delegate of the app delegate that plugins can hook into?

On 25 June 2012 19:08, Ally Ogilvie <ao...@wizcorp.jp> wrote:

> Hi All :)
>
> Our current build hub at Wizcorp has plugins in separate repos already.
> Each plugin repo is version branched.
> We have a config for each project which contains required plugin name
> (matching repo) and versions (as well as many other things).
> We clone each plugin repo from branch = version recursively and inject code
> or xml/plist data where necessary.
>
> I'd really like to sync the structure you guys have as most likely people
> will use your format as de facto for setting up plugin repos ;)
> Also, @ https://github.com/alunny/cordova-plugin-spec
> ^ I noticed your happy to dump all your HTML in www dir. I suggest sub dirs
> as some developers dont want a 100 files at root www.
> maybe;
>
> www/phonegap/js/cordova.js
> www/phonegap/plugins/yourPluginName/plugin1.js
> www/phonegap/plugins/yourPluginName/plugin2.js
>
> our full repo setup is as such;
> https://github.com/Wizcorp/phonegap-plugin-wizViewManager/tree/v1.1
>
> Thanks!
>
> On Tue, Jun 26, 2012 at 9:50 AM, Shazron <sh...@gmail.com> wrote:
>
> > Anis can chime in - he was testing with it and reported the error. I
> > believe the error was in the parser functionality in that module (I
> > assume in parsing the .xcodeproj file).
> >
> > On Mon, Jun 25, 2012 at 5:31 PM, Patrick Mueller <pm...@gmail.com>
> > wrote:
> > > On Mon, Jun 25, 2012 at 8:19 PM, Shazron <sh...@gmail.com> wrote:
> > >
> > >> It was explained to me that even numbered versions are considered
> > >> unstable
> > >>
> > >
> > > Even numbered versions are stable - 0.6.x, 0.8.x; odd versions aren't
> > > stable - 0.7.x, etc;
> > >
> > >
> > >
> >
> http://en.wikipedia.org/wiki/Software_versioning#Odd-numbered%5Fversions%5Ffor%5Fdevelopment%5Freleases
> > >
> > > Isn't this just a matter of removing
> > >
> > > "engines": {
> > >    "node": "~0.6.7"
> > >  }
> > >
> > >
> > > from the package.json?  Or is there really some reason we need this?
> > >
> > > --
> > > Patrick Mueller
> > > http://muellerware.org
> >
>
>
>
> --
> Ally Ogilvie
> Lead Developer [ iOS, Android ]
> Mobile Devices
>
> [image:
>
> http://www.wizcorp.jp/wp-content/themes/business-lite/images/all/wizcorp-logo.png
> ]
>
> 3-10-14-6F Higashi Nihombashi,
> Chuo-ku
> 103-0004, Tokyo
> Tel: (+81)3-4550-1448
> E-mail: aogilvie@wizcorp.jp
>

Re: Plugin Format and Spec

Posted by Ally Ogilvie <ao...@wizcorp.jp>.
Hi All :)

Our current build hub at Wizcorp has plugins in separate repos already.
Each plugin repo is version branched.
We have a config for each project which contains required plugin name
(matching repo) and versions (as well as many other things).
We clone each plugin repo from branch = version recursively and inject code
or xml/plist data where necessary.

I'd really like to sync the structure you guys have as most likely people
will use your format as de facto for setting up plugin repos ;)
Also, @ https://github.com/alunny/cordova-plugin-spec
^ I noticed your happy to dump all your HTML in www dir. I suggest sub dirs
as some developers dont want a 100 files at root www.
maybe;

www/phonegap/js/cordova.js
www/phonegap/plugins/yourPluginName/plugin1.js
www/phonegap/plugins/yourPluginName/plugin2.js

our full repo setup is as such;
https://github.com/Wizcorp/phonegap-plugin-wizViewManager/tree/v1.1

Thanks!

On Tue, Jun 26, 2012 at 9:50 AM, Shazron <sh...@gmail.com> wrote:

> Anis can chime in - he was testing with it and reported the error. I
> believe the error was in the parser functionality in that module (I
> assume in parsing the .xcodeproj file).
>
> On Mon, Jun 25, 2012 at 5:31 PM, Patrick Mueller <pm...@gmail.com>
> wrote:
> > On Mon, Jun 25, 2012 at 8:19 PM, Shazron <sh...@gmail.com> wrote:
> >
> >> It was explained to me that even numbered versions are considered
> >> unstable
> >>
> >
> > Even numbered versions are stable - 0.6.x, 0.8.x; odd versions aren't
> > stable - 0.7.x, etc;
> >
> >
> >
> http://en.wikipedia.org/wiki/Software_versioning#Odd-numbered%5Fversions%5Ffor%5Fdevelopment%5Freleases
> >
> > Isn't this just a matter of removing
> >
> > "engines": {
> >    "node": "~0.6.7"
> >  }
> >
> >
> > from the package.json?  Or is there really some reason we need this?
> >
> > --
> > Patrick Mueller
> > http://muellerware.org
>



-- 
Ally Ogilvie
Lead Developer [ iOS, Android ]
Mobile Devices

[image:
http://www.wizcorp.jp/wp-content/themes/business-lite/images/all/wizcorp-logo.png]

3-10-14-6F Higashi Nihombashi,
Chuo-ku
103-0004, Tokyo
Tel: (+81)3-4550-1448
E-mail: aogilvie@wizcorp.jp

Re: Plugin Format and Spec

Posted by Shazron <sh...@gmail.com>.
Anis can chime in - he was testing with it and reported the error. I
believe the error was in the parser functionality in that module (I
assume in parsing the .xcodeproj file).

On Mon, Jun 25, 2012 at 5:31 PM, Patrick Mueller <pm...@gmail.com> wrote:
> On Mon, Jun 25, 2012 at 8:19 PM, Shazron <sh...@gmail.com> wrote:
>
>> It was explained to me that even numbered versions are considered
>> unstable
>>
>
> Even numbered versions are stable - 0.6.x, 0.8.x; odd versions aren't
> stable - 0.7.x, etc;
>
>
> http://en.wikipedia.org/wiki/Software_versioning#Odd-numbered%5Fversions%5Ffor%5Fdevelopment%5Freleases
>
> Isn't this just a matter of removing
>
> "engines": {
>    "node": "~0.6.7"
>  }
>
>
> from the package.json?  Or is there really some reason we need this?
>
> --
> Patrick Mueller
> http://muellerware.org

Re: Plugin Format and Spec

Posted by Patrick Mueller <pm...@gmail.com>.
On Mon, Jun 25, 2012 at 8:19 PM, Shazron <sh...@gmail.com> wrote:

> It was explained to me that even numbered versions are considered
> unstable
>

Even numbered versions are stable - 0.6.x, 0.8.x; odd versions aren't
stable - 0.7.x, etc;


http://en.wikipedia.org/wiki/Software_versioning#Odd-numbered%5Fversions%5Ffor%5Fdevelopment%5Freleases

Isn't this just a matter of removing

"engines": {
    "node": "~0.6.7"
  }


from the package.json?  Or is there really some reason we need this?

-- 
Patrick Mueller
http://muellerware.org

Re: Plugin Format and Spec

Posted by Shazron <sh...@gmail.com>.
Not to mention - I believe if we upgrade our plugin to nodejs 0.8, it
won't work with older versions of nodejs possibly - so that's another
can of worms

On Mon, Jun 25, 2012 at 5:19 PM, Shazron <sh...@gmail.com> wrote:
> Talked to Brian and Anis.
>
> It was explained to me that even numbered versions are considered
> unstable, etc - so it's expected for devs to use a more stable
> version.
>
> I'm just considering the most common scenario - where people will
> download the latest node version 0.8 (regular dev users, not us)
>
> There's three approaches for us:
> 1. They downloaded 0.8 - tell them to downgrade, using
> https://github.com/isaacs/nave to 0.6
> 2. Upgrade our plugin to work with 0.8
> 3. Tell them to clean install 0.6 http://nodejs.org/dist/
>
> My thinking is #2 would be easiest for users, but if we are going with
> 0.6, we will have to document the steps etc for #1 and/or #3
>
> Shaz
>
> On Mon, Jun 25, 2012 at 4:52 PM, Shazron <sh...@gmail.com> wrote:
>> It's definitely a blocker IMO. 0.8 is the latest shipped version, and
>> it doesn't work with it.
>> Maybe you'll disagree, but users will.
>>
>> On Mon, Jun 25, 2012 at 4:36 PM, Filip Maj <fi...@adobe.com> wrote:
>>> Yep, 0.6.8.
>>>
>>> $ node -v
>>> v0.6.8
>>>
>>>
>>> On 6/25/12 4:32 PM, "Jesse" <pu...@gmail.com> wrote:
>>>
>>>>0.6.8 ? Is your toaster unplugged Fil?
>>>>I am in windows and running without issue :
>>>>$ node -v => v0.6.18
>>>>
>>>>
>>>>On Mon, Jun 25, 2012 at 4:29 PM, Filip Maj <fi...@adobe.com> wrote:
>>>>
>>>>> I wouldn¹t call that a blocker..
>>>>>
>>>>> Pluginstall works fine with node 0.6.8 too.
>>>>>
>>>>> I was using 0.6.6, some dependencies in pluginstall require at least
>>>>>node
>>>>> 0.6.7, so I upgraded to 0.6.8. Works fine.
>>>>>
>>>>> On 6/25/12 3:59 PM, "Shazron" <sh...@gmail.com> wrote:
>>>>>
>>>>> >pluginstall blocker:
>>>>> >https://github.com/alunny/node-xcode/issues/3
>>>>> >https://issues.apache.org/jira/browse/CB-631
>>>>> >
>>>>> >Only works with node 0.6.17
>>>>> >
>>>>> >
>>>>> >On Mon, Jun 25, 2012 at 2:09 PM, Jesse <pu...@gmail.com> wrote:
>>>>> >> We could use an 'engine' type specification similar to npm :
>>>>> >> "engine": "node >= 0.4.1"
>>>>> >>
>>>>> >>
>>>>> >>
>>>>>
>>>>>http://blog.nodejs.org/2012/02/27/managing-node-js-dependencies-with-shri
>>>>> >>nkwrap/
>>>>> >>
>>>>> >>
>>>>> >> On Mon, Jun 25, 2012 at 2:02 PM, Filip Maj <fi...@adobe.com> wrote:
>>>>> >>
>>>>> >>> Ideally, I would think we do NOT plan on doing that post-2.0. That
>>>>> >>>said,
>>>>> >>> our current deprecation policy, last I checked, was "6 months from
>>>>> >>>now",
>>>>> >>> which does not guarantee that the API will not change between minor
>>>>> >>> revisions.
>>>>> >>>
>>>>> >>> Thus, the conversation turns back to project versioning and
>>>>> >>>deprecation.
>>>>> >>>
>>>>> >>> Mike and I spoke about this this morning. I think both of us support
>>>>> >>>the
>>>>> >>> idea of moving to semantic versioning for 2.0 and beyond.
>>>>> >>>
>>>>> >>> On 6/25/12 1:45 PM, "Anis KADRI" <an...@gmail.com> wrote:
>>>>> >>>
>>>>> >>> >Agreed fil, but are we planning on doing that for future releases ?
>>>>> >>>If yes
>>>>> >>> >that YAH we should support versions and the solution you described
>>>>>is
>>>>> >>> >certainly an option. But if I were a plugin developer, I would not
>>>>> >>>want to
>>>>> >>> >update it every month to keep up with Cordova releases.
>>>>> >>> >I don't disagree that there could be an Cordova version in the
>>>>> >>>manifest
>>>>> >>> >file that allows plugin developers to target a specific version of
>>>>> >>>Cordova
>>>>> >>> >(which would mean that the plugin was tested with that version but
>>>>> >>>might
>>>>> >>> >also work with newer versions).
>>>>> >>> >
>>>>> >>> >On Mon, Jun 25, 2012 at 1:33 PM, Filip Maj <fi...@adobe.com> wrote:
>>>>> >>> >
>>>>> >>> >> Yes, it has changed every month. Pretty much every minor revision
>>>>> >>>from
>>>>> >>> >>1.0
>>>>> >>> >> to 1.9 has changed the API (at least on Android).
>>>>> >>> >>
>>>>> >>> >> On 6/25/12 1:26 PM, "Anis KADRI" <an...@gmail.com> wrote:
>>>>> >>> >>
>>>>> >>> >> >Right but does the plugin interface change every month too ? A
>>>>> >>>plugin
>>>>> >>> >>that
>>>>> >>> >> >works with Cordova 1.x.x is not supposed to work with Cordova
>>>>> >>>1.y.y ?
>>>>> >>> >> >
>>>>> >>> >> >On Mon, Jun 25, 2012 at 1:18 PM, Filip Maj <fi...@adobe.com>
>>>>>wrote:
>>>>> >>> >> >
>>>>> >>> >> >> You don't see any reason why plugins should support different
>>>>> >>> >>versions
>>>>> >>> >> >>of
>>>>> >>> >> >> cordova? Cordova gets released every month. This seems like a
>>>>> >>>pretty
>>>>> >>> >> >> important thing to figure out IMO
>>>>> >>> >> >>
>>>>> >>> >> >> On 6/25/12 1:12 PM, "Anis KADRI" <an...@gmail.com> wrote:
>>>>> >>> >> >>
>>>>> >>> >> >> >I think we should agree on a spec (plugin package and plugin
>>>>> >>> >>interface)
>>>>> >>> >> >> >and
>>>>> >>> >> >> >stick to it. As long as we don't break the plugin interface,
>>>>>I
>>>>> >>>don't
>>>>> >>> >> >>see
>>>>> >>> >> >> >any reason why plugins should support multiple versions of
>>>>> >>>Cordova.
>>>>> >>> >>If
>>>>> >>> >> >> >there are any, I'd love to hear them.
>>>>> >>> >> >> >
>>>>> >>> >> >> >On Mon, Jun 25, 2012 at 1:01 PM, Filip Maj <fi...@adobe.com>
>>>>> >>>wrote:
>>>>> >>> >> >> >
>>>>> >>> >> >> >> Back onto the versioning question..
>>>>> >>> >> >> >>
>>>>> >>> >> >> >> 1. Do we want to support different version of the cordova
>>>>> >>> >>framework
>>>>> >>> >> >>in
>>>>> >>> >> >> >> plugins, within a single repo, across versions that changed
>>>>> >>>the
>>>>> >>> >> >> >> native/javascript plugin API?
>>>>> >>> >> >> >> 2. How?
>>>>> >>> >> >> >>
>>>>> >>> >> >> >> If the answer to (1) is yes, one idea for (2) might be
>>>>>nesting
>>>>> >>> >> >>another
>>>>> >>> >> >> >> directory level in the all of the source directories that
>>>>> >>>contains
>>>>> >>> >> >>the
>>>>> >>> >> >> >> version number supported. For example:
>>>>> >>> >> >> >>
>>>>> >>> >> >> >> src/android/1.5.0/*.java
>>>>> >>> >> >> >> src/android/1.8.1/*.java
>>>>> >>> >> >> >> www/1.5.0/childbrowser.js
>>>>> >>> >> >> >> www/1.8.1/childbrowser.js
>>>>> >>> >> >> >>
>>>>> >>> >> >> >> Could get gnarly real quick though. Another, cleaner
>>>>> >>> >>implementation
>>>>> >>> >> >>in
>>>>> >>> >> >> >> terms of file system "noise" might be to employ a git
>>>>>branches
>>>>> >>> >> >> >> convention.. But that would enforce a git dependency.
>>>>> >>> >> >> >>
>>>>> >>> >> >> >> Just brainstorming / thinking out loud. Both are probably
>>>>>bad
>>>>> >>> >>ideas
>>>>> >>> >> >>:)
>>>>> >>> >> >> >>
>>>>> >>> >> >> >> On 6/25/12 11:41 AM, "Michael Brooks"
>>>>> >>><mi...@michaelbrooks.ca>
>>>>> >>> >> >>wrote:
>>>>> >>> >> >> >>
>>>>> >>> >> >> >> >We may also want to describe testing from JavaScript and
>>>>> >>>Native.
>>>>> >>> >> >> >> >
>>>>> >>> >> >> >> >I would also like to see a repository called
>>>>> >>> >> >>"cordova-plugin-template"
>>>>> >>> >> >> >> >that
>>>>> >>> >> >> >> >is a boilerplate to start writing any plugin. The idea is
>>>>> >>>that
>>>>> >>> >>users
>>>>> >>> >> >> >>start
>>>>> >>> >> >> >> >with something that works, with tests, and documentation
>>>>> >>> >> >>boilerplate -
>>>>> >>> >> >> >> >perhaps it can be an echo plugin since that has a minimal
>>>>> >>> >>footprint.
>>>>> >>> >> >> >> >
>>>>> >>> >> >> >> >On Mon, Jun 25, 2012 at 11:28 AM, Filip Maj
>>>>><fi...@adobe.com>
>>>>> >>> >>wrote:
>>>>> >>> >> >> >> >
>>>>> >>> >> >> >> >> Looks great. I'll add some detail to the list you have
>>>>> >>>here.
>>>>> >>> >>I'd
>>>>> >>> >> >> >> >>recommend
>>>>> >>> >> >> >> >> tweaking the order a little bit; introducing the JS
>>>>>before
>>>>> >>>the
>>>>> >>> >> >>native
>>>>> >>> >> >> >> >>APIs.
>>>>> >>> >> >> >> >>
>>>>> >>> >> >> >> >> # Plugin Author Guide
>>>>> >>> >> >> >> >>
>>>>> >>> >> >> >> >> - plugin package format -> points to Andrew's plugin
>>>>>spec
>>>>> >>> >> >> >> >> - js api
>>>>> >>> >> >> >> >> --- basically documenting exec(). Service, action,
>>>>> >>>callbacks,
>>>>> >>> >> >> >>arguments.
>>>>> >>> >> >> >> >> What about how arguments are translated from JS types
>>>>> >>>(string,
>>>>> >>> >> >> >>number,
>>>>> >>> >> >> >> >> objects, etc) to native types for each platform?
>>>>> >>> >> >> >> >>
>>>>> >>> >> >> >> >> - native api
>>>>> >>> >> >> >> >> --- ios
>>>>> >>> >> >> >> >> --- android
>>>>> >>> >> >> >> >> --- blackberry
>>>>> >>> >> >> >> >> --- windowsphone
>>>>> >>> >> >> >> >> --- bada
>>>>> >>> >> >> >> >>
>>>>> >>> >> >> >> >>
>>>>> >>> >> >> >> >> On 6/25/12 11:16 AM, "Brian LeRoux" <b...@brian.io> wrote:
>>>>> >>> >> >> >> >>
>>>>> >>> >> >> >> >> >Biggest question is how to document. My thinking is
>>>>>that
>>>>> >>>we
>>>>> >>> >>want
>>>>> >>> >> >>to
>>>>> >>> >> >> >> >> >specify the PluginPackage so that PluginInstall works.
>>>>>So
>>>>> >>>the
>>>>> >>> >> >>docs
>>>>> >>> >> >> >> >> >would read like this:
>>>>> >>> >> >> >> >> >
>>>>> >>> >> >> >> >> ># Plugin Author Guide
>>>>> >>> >> >> >> >> >
>>>>> >>> >> >> >> >> >- plugin package format
>>>>> >>> >> >> >> >> >- native api
>>>>> >>> >> >> >> >> >--- ios
>>>>> >>> >> >> >> >> >--- android
>>>>> >>> >> >> >> >> >--- blackberry
>>>>> >>> >> >> >> >> >--- windowsphone
>>>>> >>> >> >> >> >> >--- bada
>>>>> >>> >> >> >> >> >- js api
>>>>> >>> >> >> >> >> >
>>>>> >>> >> >> >> >> >Thoughts? (If this looks good I will update the issue.)
>>>>> >>> >> >> >> >> >
>>>>> >>> >> >> >> >> >
>>>>> >>> >> >> >> >> >
>>>>> >>> >> >> >> >> >On Mon, Jun 25, 2012 at 10:50 AM, Filip Maj
>>>>> >>><fi...@adobe.com>
>>>>> >>> >> >>wrote:
>>>>> >>> >> >> >> >> >> Hah Michael and I were just talking about that..
>>>>> >>> >> >> >> >> >>
>>>>> >>> >> >> >> >> >> I will send a pull request to Andrew's draft spec
>>>>> >>> >> >> >> >> >>
>>>>> >>> >> >> >> >> >> On 6/25/12 10:46 AM, "Brian LeRoux" <b...@brian.io>
>>>>>wrote:
>>>>> >>> >> >> >> >> >>
>>>>> >>> >> >> >> >> >>>npm does this w/ an 'engines' attribute on
>>>>>package.json
>>>>> >>> >> >> >> >> >>>
>>>>> >>> >> >> >> >> >>>On Mon, Jun 25, 2012 at 10:26 AM, Filip Maj
>>>>> >>><fi...@adobe.com>
>>>>> >>> >> >> wrote:
>>>>> >>> >> >> >> >> >>>> One more thing that came to mind is how to support
>>>>> >>> >>different
>>>>> >>> >> >> >> >>versions
>>>>> >>> >> >> >> >> >>>>of Cordova? Any ideas?
>>>>> >>> >> >> >> >> >>>>
>>>>> >>> >> >> >> >> >>>> From: Andrew Lunny
>>>>> >>> >> >><al...@gmail.com>>
>>>>> >>> >> >> >> >> >>>> Reply-To:
>>>>>"alunny@gmail.com<ma...@gmail.com>"
>>>>> >>> >> >> >> >> >>>><al...@gmail.com>>
>>>>> >>> >> >> >> >> >>>> To: Default User Nam
>>>>> >>><fil@adobe.com<mailto:fil@adobe.com
>>>>> >>> >>
>>>>> >>> >> >> >> >> >>>> Cc:
>>>>> >>> >> >> >> >> >>>>"callback-dev@incubator.apache.org<mailto:
>>>>> >>> >> >> >> >> callback-dev@incubator.apache
>>>>> >>> >> >> >> >> >>>>.o
>>>>> >>> >> >> >> >> >>>>rg>"
>>>>> >>> >> >> >> >> >>>><callback-dev@incubator.apache.org<mailto:
>>>>> >>> >> >> >> >> callback-dev@incubator.apache
>>>>> >>> >> >> >> >> >>>>.o
>>>>> >>> >> >> >> >> >>>>rg>>
>>>>> >>> >> >> >> >> >>>> Subject: Re: Plugin Format and Spec
>>>>> >>> >> >> >> >> >>>>
>>>>> >>> >> >> >> >> >>>>
>>>>> >>> >> >> >> >> >>>>
>>>>> >>> >> >> >> >> >>>> On 11 June 2012 13:50, Filip Maj
>>>>> >>> >> >> >> >><fil@adobe.com<mailto:fil@adobe.com
>>>>> >>> >> >> >> >> >>
>>>>> >>> >> >> >> >> >>>>wrote:
>>>>> >>> >> >> >> >> >>>> Nice work Andrew! I suggest taking this and moving
>>>>>to
>>>>> >>>a
>>>>> >>> >> >>cordova
>>>>> >>> >> >> >> >>wiki
>>>>> >>> >> >> >> >> >>>>page
>>>>> >>> >> >> >> >> >>>> (assuming all committers are on board to adopting
>>>>> >>>this as
>>>>> >>> >>the
>>>>> >>> >> >> >>basis
>>>>> >>> >> >> >> >> >>>>for
>>>>> >>> >> >> >> >> >>>>a
>>>>> >>> >> >> >> >> >>>> plugin spec)
>>>>> >>> >> >> >> >> >>>>
>>>>> >>> >> >> >> >> >>>> A link on the Cordova wiki is probably the best
>>>>>place
>>>>> >>>to
>>>>> >>> >> >>start
>>>>> >>> >> >> >>- we
>>>>> >>> >> >> >> >> >>>>can
>>>>> >>> >> >> >> >> >>>>get some more feedback from plugin authors and app
>>>>> >>> >>developers
>>>>> >>> >> >> >>(i.e.
>>>>> >>> >> >> >> >> >>>>keep
>>>>> >>> >> >> >> >> >>>>this as "a way to write plugins" rather than "the
>>>>> >>>official
>>>>> >>> >> >>way to
>>>>> >>> >> >> >> >>write
>>>>> >>> >> >> >> >> >>>>plugins").
>>>>> >>> >> >> >> >> >>>>
>>>>> >>> >> >> >> >> >>>>
>>>>> >>> >> >> >> >> >>>> Is target-dir necessary for the <source-file>
>>>>> >>>element? For
>>>>> >>> >> >>Java
>>>>> >>> >> >> >> >>files,
>>>>> >>> >> >> >> >> >>>>the
>>>>> >>> >> >> >> >> >>>> tooling could take a peak inside the .java file and
>>>>> >>> >>extract
>>>>> >>> >> >>out
>>>>> >>> >> >> >>the
>>>>> >>> >> >> >> >> >>>> package name from the file, no? Phonegap build
>>>>>already
>>>>> >>> >>does
>>>>> >>> >> >>this
>>>>> >>> >> >> >> >> >>>>doesn't
>>>>> >>> >> >> >> >> >>>> it?
>>>>> >>> >> >> >> >> >>>>
>>>>> >>> >> >> >> >> >>>> PhoneGap Build did do this, but no longer supports
>>>>> >>> >>uploading
>>>>> >>> >> >> >> >>arbitrary
>>>>> >>> >> >> >> >> >>>>Java files. Only plugins with a manifest are
>>>>>supported.
>>>>> >>> >> >> >> >> >>>>
>>>>> >>> >> >> >> >> >>>> I'm torn - one of the goals of this format is to
>>>>>make
>>>>> >>>it
>>>>> >>> >>as
>>>>> >>> >> >> >>easy as
>>>>> >>> >> >> >> >> >>>>possible to write tools that use it as possible.
>>>>>Right
>>>>> >>> >>now, a
>>>>> >>> >> >> >>tool
>>>>> >>> >> >> >> >> >>>>reads
>>>>> >>> >> >> >> >> >>>>one file (plugin.xml) and moves source files
>>>>>(ignoring
>>>>> >>> >>config
>>>>> >>> >> >> >>files
>>>>> >>> >> >> >> >>for
>>>>> >>> >> >> >> >> >>>>the moment). I'd prefer it wasn't "read one file,
>>>>>then
>>>>> >>>read
>>>>> >>> >> >>each
>>>>> >>> >> >> >> >>.java
>>>>> >>> >> >> >> >> >>>>file to discover where to move it".
>>>>> >>> >> >> >> >> >>>>
>>>>> >>> >> >> >> >> >>>> One option is to use the id attribute on the
>>>>>top-level
>>>>> >>> >>plugin
>>>>> >>> >> >> >> >>element
>>>>> >>> >> >> >> >> >>>>to resolve the path, but that doesn't handle the
>>>>>case
>>>>> >>>where
>>>>> >>> >> >> >> >>different
>>>>> >>> >> >> >> >> >>>>Java files will have different paths. I wonder if
>>>>> >>>there are
>>>>> >>> >> >>more
>>>>> >>> >> >> >> >> >>>>complex
>>>>> >>> >> >> >> >> >>>>plugins around we can try to convert to see where
>>>>>the
>>>>> >>>pain
>>>>> >>> >> >>points
>>>>> >>> >> >> >> >>are.
>>>>> >>> >> >> >> >> >>>>
>>>>> >>> >> >> >> >> >>>>
>>>>> >>> >> >> >> >> >>>> Adding the ability to modify existing parts of a
>>>>> >>>native
>>>>> >>> >> >> >>platform's
>>>>> >>> >> >> >> >> >>>>config
>>>>> >>> >> >> >> >> >>>> document to the <config-file> portion might be
>>>>> >>>needed..
>>>>> >>> >> >>Although
>>>>> >>> >> >> >> >>Ive
>>>>> >>> >> >> >> >> >>>>yet
>>>>> >>> >> >> >> >> >>>> to dig up a use case. Will dig around more.
>>>>> >>> >> >> >> >> >>>>
>>>>> >>> >> >> >> >> >>>> Agreed - also things like target OS/SDK versions
>>>>>may
>>>>> >>>be
>>>>> >>> >> >> >>required by
>>>>> >>> >> >> >> >> >>>>certain plugins (i.e. this plugin uses an iOS 6 API,
>>>>> >>>so we
>>>>> >>> >> >>need
>>>>> >>> >> >> >>to
>>>>> >>> >> >> >> >> >>>>update your project to iOS 6). Probably the best
>>>>> >>>approach
>>>>> >>> >> >>there
>>>>> >>> >> >> >>is
>>>>> >>> >> >> >> >>to
>>>>> >>> >> >> >> >> >>>>warn/prompt the user before proceeding.
>>>>> >>> >> >> >> >> >>>>
>>>>> >>> >> >> >> >> >>>> +1 agree that <resource-file> and <header-file> is
>>>>> >>> >>redundant.
>>>>> >>> >> >> >> >>Tooling
>>>>> >>> >> >> >> >> >>>> should be able to distinguish this so merging with
>>>>> >>> >> >><source-file>
>>>>> >>> >> >> >> >> >>>>makes a
>>>>> >>> >> >> >> >> >>>> lot of sense.
>>>>> >>> >> >> >> >> >>>>
>>>>> >>> >> >> >> >> >>>> Looking good!
>>>>> >>> >> >> >> >> >>>>
>>>>> >>> >> >> >> >> >>>> On 6/8/12 6:40 PM, "Andrew Lunny"
>>>>> >>> >> >> >> >> >>>><al...@gmail.com>> wrote:
>>>>> >>> >> >> >> >> >>>>
>>>>> >>> >> >> >> >> >>>>>Hi all,
>>>>> >>> >> >> >> >> >>>>>
>>>>> >>> >> >> >> >> >>>>>I've posted to this list before about
>>>>>pluginstall[1],
>>>>> >>>the
>>>>> >>> >> >>tool
>>>>> >>> >> >> >>I've
>>>>> >>> >> >> >> >> >>>>>developed as part of working on PhoneGap Build and
>>>>> >>> >>requiring
>>>>> >>> >> >> >> >> >>>>>programmatic
>>>>> >>> >> >> >> >> >>>>>installation of Cordova plugins.
>>>>> >>> >> >> >> >> >>>>>
>>>>> >>> >> >> >> >> >>>>>I've now written up a spec for the format that
>>>>> >>>pluginstall
>>>>> >>> >> >>uses
>>>>> >>> >> >> >>- I
>>>>> >>> >> >> >> >> >>>>>think
>>>>> >>> >> >> >> >> >>>>>it's generally useful for Cordova plugin
>>>>>installation
>>>>> >>>and
>>>>> >>> >> >> >> >> >>>>>manipulation.
>>>>> >>> >> >> >> >> >>>>>The
>>>>> >>> >> >> >> >> >>>>>spec is available on GitHub:
>>>>> >>> >> >> >> >> >>>>>https://github.com/alunny/cordova-plugin-spec
>>>>> >>> >> >> >> >> >>>>>
>>>>> >>> >> >> >> >> >>>>>Issues and/or pull requests and/or forks welcome.
>>>>> >>> >> >> >> >> >>>>>
>>>>> >>> >> >> >> >> >>>>>Cheers,
>>>>> >>> >> >> >> >> >>>>>Andrew
>>>>> >>> >> >> >> >> >>>>>
>>>>> >>> >> >> >> >> >>>>>[1] https://github.com/alunny/pluginstall
>>>>> >>> >> >> >> >> >>>>
>>>>> >>> >> >> >> >> >>>>
>>>>> >>> >> >> >> >> >>
>>>>> >>> >> >> >> >>
>>>>> >>> >> >> >> >>
>>>>> >>> >> >> >>
>>>>> >>> >> >> >>
>>>>> >>> >> >>
>>>>> >>> >> >>
>>>>> >>> >>
>>>>> >>> >>
>>>>> >>>
>>>>> >>>
>>>>> >>
>>>>> >>
>>>>> >> --
>>>>> >> @purplecabbage
>>>>> >> risingj.com
>>>>>
>>>>>
>>>>
>>>>
>>>>--
>>>>@purplecabbage
>>>>risingj.com
>>>

Re: Plugin Format and Spec

Posted by Shazron <sh...@gmail.com>.
Talked to Brian and Anis.

It was explained to me that even numbered versions are considered
unstable, etc - so it's expected for devs to use a more stable
version.

I'm just considering the most common scenario - where people will
download the latest node version 0.8 (regular dev users, not us)

There's three approaches for us:
1. They downloaded 0.8 - tell them to downgrade, using
https://github.com/isaacs/nave to 0.6
2. Upgrade our plugin to work with 0.8
3. Tell them to clean install 0.6 http://nodejs.org/dist/

My thinking is #2 would be easiest for users, but if we are going with
0.6, we will have to document the steps etc for #1 and/or #3

Shaz

On Mon, Jun 25, 2012 at 4:52 PM, Shazron <sh...@gmail.com> wrote:
> It's definitely a blocker IMO. 0.8 is the latest shipped version, and
> it doesn't work with it.
> Maybe you'll disagree, but users will.
>
> On Mon, Jun 25, 2012 at 4:36 PM, Filip Maj <fi...@adobe.com> wrote:
>> Yep, 0.6.8.
>>
>> $ node -v
>> v0.6.8
>>
>>
>> On 6/25/12 4:32 PM, "Jesse" <pu...@gmail.com> wrote:
>>
>>>0.6.8 ? Is your toaster unplugged Fil?
>>>I am in windows and running without issue :
>>>$ node -v => v0.6.18
>>>
>>>
>>>On Mon, Jun 25, 2012 at 4:29 PM, Filip Maj <fi...@adobe.com> wrote:
>>>
>>>> I wouldn¹t call that a blocker..
>>>>
>>>> Pluginstall works fine with node 0.6.8 too.
>>>>
>>>> I was using 0.6.6, some dependencies in pluginstall require at least
>>>>node
>>>> 0.6.7, so I upgraded to 0.6.8. Works fine.
>>>>
>>>> On 6/25/12 3:59 PM, "Shazron" <sh...@gmail.com> wrote:
>>>>
>>>> >pluginstall blocker:
>>>> >https://github.com/alunny/node-xcode/issues/3
>>>> >https://issues.apache.org/jira/browse/CB-631
>>>> >
>>>> >Only works with node 0.6.17
>>>> >
>>>> >
>>>> >On Mon, Jun 25, 2012 at 2:09 PM, Jesse <pu...@gmail.com> wrote:
>>>> >> We could use an 'engine' type specification similar to npm :
>>>> >> "engine": "node >= 0.4.1"
>>>> >>
>>>> >>
>>>> >>
>>>>
>>>>http://blog.nodejs.org/2012/02/27/managing-node-js-dependencies-with-shri
>>>> >>nkwrap/
>>>> >>
>>>> >>
>>>> >> On Mon, Jun 25, 2012 at 2:02 PM, Filip Maj <fi...@adobe.com> wrote:
>>>> >>
>>>> >>> Ideally, I would think we do NOT plan on doing that post-2.0. That
>>>> >>>said,
>>>> >>> our current deprecation policy, last I checked, was "6 months from
>>>> >>>now",
>>>> >>> which does not guarantee that the API will not change between minor
>>>> >>> revisions.
>>>> >>>
>>>> >>> Thus, the conversation turns back to project versioning and
>>>> >>>deprecation.
>>>> >>>
>>>> >>> Mike and I spoke about this this morning. I think both of us support
>>>> >>>the
>>>> >>> idea of moving to semantic versioning for 2.0 and beyond.
>>>> >>>
>>>> >>> On 6/25/12 1:45 PM, "Anis KADRI" <an...@gmail.com> wrote:
>>>> >>>
>>>> >>> >Agreed fil, but are we planning on doing that for future releases ?
>>>> >>>If yes
>>>> >>> >that YAH we should support versions and the solution you described
>>>>is
>>>> >>> >certainly an option. But if I were a plugin developer, I would not
>>>> >>>want to
>>>> >>> >update it every month to keep up with Cordova releases.
>>>> >>> >I don't disagree that there could be an Cordova version in the
>>>> >>>manifest
>>>> >>> >file that allows plugin developers to target a specific version of
>>>> >>>Cordova
>>>> >>> >(which would mean that the plugin was tested with that version but
>>>> >>>might
>>>> >>> >also work with newer versions).
>>>> >>> >
>>>> >>> >On Mon, Jun 25, 2012 at 1:33 PM, Filip Maj <fi...@adobe.com> wrote:
>>>> >>> >
>>>> >>> >> Yes, it has changed every month. Pretty much every minor revision
>>>> >>>from
>>>> >>> >>1.0
>>>> >>> >> to 1.9 has changed the API (at least on Android).
>>>> >>> >>
>>>> >>> >> On 6/25/12 1:26 PM, "Anis KADRI" <an...@gmail.com> wrote:
>>>> >>> >>
>>>> >>> >> >Right but does the plugin interface change every month too ? A
>>>> >>>plugin
>>>> >>> >>that
>>>> >>> >> >works with Cordova 1.x.x is not supposed to work with Cordova
>>>> >>>1.y.y ?
>>>> >>> >> >
>>>> >>> >> >On Mon, Jun 25, 2012 at 1:18 PM, Filip Maj <fi...@adobe.com>
>>>>wrote:
>>>> >>> >> >
>>>> >>> >> >> You don't see any reason why plugins should support different
>>>> >>> >>versions
>>>> >>> >> >>of
>>>> >>> >> >> cordova? Cordova gets released every month. This seems like a
>>>> >>>pretty
>>>> >>> >> >> important thing to figure out IMO
>>>> >>> >> >>
>>>> >>> >> >> On 6/25/12 1:12 PM, "Anis KADRI" <an...@gmail.com> wrote:
>>>> >>> >> >>
>>>> >>> >> >> >I think we should agree on a spec (plugin package and plugin
>>>> >>> >>interface)
>>>> >>> >> >> >and
>>>> >>> >> >> >stick to it. As long as we don't break the plugin interface,
>>>>I
>>>> >>>don't
>>>> >>> >> >>see
>>>> >>> >> >> >any reason why plugins should support multiple versions of
>>>> >>>Cordova.
>>>> >>> >>If
>>>> >>> >> >> >there are any, I'd love to hear them.
>>>> >>> >> >> >
>>>> >>> >> >> >On Mon, Jun 25, 2012 at 1:01 PM, Filip Maj <fi...@adobe.com>
>>>> >>>wrote:
>>>> >>> >> >> >
>>>> >>> >> >> >> Back onto the versioning question..
>>>> >>> >> >> >>
>>>> >>> >> >> >> 1. Do we want to support different version of the cordova
>>>> >>> >>framework
>>>> >>> >> >>in
>>>> >>> >> >> >> plugins, within a single repo, across versions that changed
>>>> >>>the
>>>> >>> >> >> >> native/javascript plugin API?
>>>> >>> >> >> >> 2. How?
>>>> >>> >> >> >>
>>>> >>> >> >> >> If the answer to (1) is yes, one idea for (2) might be
>>>>nesting
>>>> >>> >> >>another
>>>> >>> >> >> >> directory level in the all of the source directories that
>>>> >>>contains
>>>> >>> >> >>the
>>>> >>> >> >> >> version number supported. For example:
>>>> >>> >> >> >>
>>>> >>> >> >> >> src/android/1.5.0/*.java
>>>> >>> >> >> >> src/android/1.8.1/*.java
>>>> >>> >> >> >> www/1.5.0/childbrowser.js
>>>> >>> >> >> >> www/1.8.1/childbrowser.js
>>>> >>> >> >> >>
>>>> >>> >> >> >> Could get gnarly real quick though. Another, cleaner
>>>> >>> >>implementation
>>>> >>> >> >>in
>>>> >>> >> >> >> terms of file system "noise" might be to employ a git
>>>>branches
>>>> >>> >> >> >> convention.. But that would enforce a git dependency.
>>>> >>> >> >> >>
>>>> >>> >> >> >> Just brainstorming / thinking out loud. Both are probably
>>>>bad
>>>> >>> >>ideas
>>>> >>> >> >>:)
>>>> >>> >> >> >>
>>>> >>> >> >> >> On 6/25/12 11:41 AM, "Michael Brooks"
>>>> >>><mi...@michaelbrooks.ca>
>>>> >>> >> >>wrote:
>>>> >>> >> >> >>
>>>> >>> >> >> >> >We may also want to describe testing from JavaScript and
>>>> >>>Native.
>>>> >>> >> >> >> >
>>>> >>> >> >> >> >I would also like to see a repository called
>>>> >>> >> >>"cordova-plugin-template"
>>>> >>> >> >> >> >that
>>>> >>> >> >> >> >is a boilerplate to start writing any plugin. The idea is
>>>> >>>that
>>>> >>> >>users
>>>> >>> >> >> >>start
>>>> >>> >> >> >> >with something that works, with tests, and documentation
>>>> >>> >> >>boilerplate -
>>>> >>> >> >> >> >perhaps it can be an echo plugin since that has a minimal
>>>> >>> >>footprint.
>>>> >>> >> >> >> >
>>>> >>> >> >> >> >On Mon, Jun 25, 2012 at 11:28 AM, Filip Maj
>>>><fi...@adobe.com>
>>>> >>> >>wrote:
>>>> >>> >> >> >> >
>>>> >>> >> >> >> >> Looks great. I'll add some detail to the list you have
>>>> >>>here.
>>>> >>> >>I'd
>>>> >>> >> >> >> >>recommend
>>>> >>> >> >> >> >> tweaking the order a little bit; introducing the JS
>>>>before
>>>> >>>the
>>>> >>> >> >>native
>>>> >>> >> >> >> >>APIs.
>>>> >>> >> >> >> >>
>>>> >>> >> >> >> >> # Plugin Author Guide
>>>> >>> >> >> >> >>
>>>> >>> >> >> >> >> - plugin package format -> points to Andrew's plugin
>>>>spec
>>>> >>> >> >> >> >> - js api
>>>> >>> >> >> >> >> --- basically documenting exec(). Service, action,
>>>> >>>callbacks,
>>>> >>> >> >> >>arguments.
>>>> >>> >> >> >> >> What about how arguments are translated from JS types
>>>> >>>(string,
>>>> >>> >> >> >>number,
>>>> >>> >> >> >> >> objects, etc) to native types for each platform?
>>>> >>> >> >> >> >>
>>>> >>> >> >> >> >> - native api
>>>> >>> >> >> >> >> --- ios
>>>> >>> >> >> >> >> --- android
>>>> >>> >> >> >> >> --- blackberry
>>>> >>> >> >> >> >> --- windowsphone
>>>> >>> >> >> >> >> --- bada
>>>> >>> >> >> >> >>
>>>> >>> >> >> >> >>
>>>> >>> >> >> >> >> On 6/25/12 11:16 AM, "Brian LeRoux" <b...@brian.io> wrote:
>>>> >>> >> >> >> >>
>>>> >>> >> >> >> >> >Biggest question is how to document. My thinking is
>>>>that
>>>> >>>we
>>>> >>> >>want
>>>> >>> >> >>to
>>>> >>> >> >> >> >> >specify the PluginPackage so that PluginInstall works.
>>>>So
>>>> >>>the
>>>> >>> >> >>docs
>>>> >>> >> >> >> >> >would read like this:
>>>> >>> >> >> >> >> >
>>>> >>> >> >> >> >> ># Plugin Author Guide
>>>> >>> >> >> >> >> >
>>>> >>> >> >> >> >> >- plugin package format
>>>> >>> >> >> >> >> >- native api
>>>> >>> >> >> >> >> >--- ios
>>>> >>> >> >> >> >> >--- android
>>>> >>> >> >> >> >> >--- blackberry
>>>> >>> >> >> >> >> >--- windowsphone
>>>> >>> >> >> >> >> >--- bada
>>>> >>> >> >> >> >> >- js api
>>>> >>> >> >> >> >> >
>>>> >>> >> >> >> >> >Thoughts? (If this looks good I will update the issue.)
>>>> >>> >> >> >> >> >
>>>> >>> >> >> >> >> >
>>>> >>> >> >> >> >> >
>>>> >>> >> >> >> >> >On Mon, Jun 25, 2012 at 10:50 AM, Filip Maj
>>>> >>><fi...@adobe.com>
>>>> >>> >> >>wrote:
>>>> >>> >> >> >> >> >> Hah Michael and I were just talking about that..
>>>> >>> >> >> >> >> >>
>>>> >>> >> >> >> >> >> I will send a pull request to Andrew's draft spec
>>>> >>> >> >> >> >> >>
>>>> >>> >> >> >> >> >> On 6/25/12 10:46 AM, "Brian LeRoux" <b...@brian.io>
>>>>wrote:
>>>> >>> >> >> >> >> >>
>>>> >>> >> >> >> >> >>>npm does this w/ an 'engines' attribute on
>>>>package.json
>>>> >>> >> >> >> >> >>>
>>>> >>> >> >> >> >> >>>On Mon, Jun 25, 2012 at 10:26 AM, Filip Maj
>>>> >>><fi...@adobe.com>
>>>> >>> >> >> wrote:
>>>> >>> >> >> >> >> >>>> One more thing that came to mind is how to support
>>>> >>> >>different
>>>> >>> >> >> >> >>versions
>>>> >>> >> >> >> >> >>>>of Cordova? Any ideas?
>>>> >>> >> >> >> >> >>>>
>>>> >>> >> >> >> >> >>>> From: Andrew Lunny
>>>> >>> >> >><al...@gmail.com>>
>>>> >>> >> >> >> >> >>>> Reply-To:
>>>>"alunny@gmail.com<ma...@gmail.com>"
>>>> >>> >> >> >> >> >>>><al...@gmail.com>>
>>>> >>> >> >> >> >> >>>> To: Default User Nam
>>>> >>><fil@adobe.com<mailto:fil@adobe.com
>>>> >>> >>
>>>> >>> >> >> >> >> >>>> Cc:
>>>> >>> >> >> >> >> >>>>"callback-dev@incubator.apache.org<mailto:
>>>> >>> >> >> >> >> callback-dev@incubator.apache
>>>> >>> >> >> >> >> >>>>.o
>>>> >>> >> >> >> >> >>>>rg>"
>>>> >>> >> >> >> >> >>>><callback-dev@incubator.apache.org<mailto:
>>>> >>> >> >> >> >> callback-dev@incubator.apache
>>>> >>> >> >> >> >> >>>>.o
>>>> >>> >> >> >> >> >>>>rg>>
>>>> >>> >> >> >> >> >>>> Subject: Re: Plugin Format and Spec
>>>> >>> >> >> >> >> >>>>
>>>> >>> >> >> >> >> >>>>
>>>> >>> >> >> >> >> >>>>
>>>> >>> >> >> >> >> >>>> On 11 June 2012 13:50, Filip Maj
>>>> >>> >> >> >> >><fil@adobe.com<mailto:fil@adobe.com
>>>> >>> >> >> >> >> >>
>>>> >>> >> >> >> >> >>>>wrote:
>>>> >>> >> >> >> >> >>>> Nice work Andrew! I suggest taking this and moving
>>>>to
>>>> >>>a
>>>> >>> >> >>cordova
>>>> >>> >> >> >> >>wiki
>>>> >>> >> >> >> >> >>>>page
>>>> >>> >> >> >> >> >>>> (assuming all committers are on board to adopting
>>>> >>>this as
>>>> >>> >>the
>>>> >>> >> >> >>basis
>>>> >>> >> >> >> >> >>>>for
>>>> >>> >> >> >> >> >>>>a
>>>> >>> >> >> >> >> >>>> plugin spec)
>>>> >>> >> >> >> >> >>>>
>>>> >>> >> >> >> >> >>>> A link on the Cordova wiki is probably the best
>>>>place
>>>> >>>to
>>>> >>> >> >>start
>>>> >>> >> >> >>- we
>>>> >>> >> >> >> >> >>>>can
>>>> >>> >> >> >> >> >>>>get some more feedback from plugin authors and app
>>>> >>> >>developers
>>>> >>> >> >> >>(i.e.
>>>> >>> >> >> >> >> >>>>keep
>>>> >>> >> >> >> >> >>>>this as "a way to write plugins" rather than "the
>>>> >>>official
>>>> >>> >> >>way to
>>>> >>> >> >> >> >>write
>>>> >>> >> >> >> >> >>>>plugins").
>>>> >>> >> >> >> >> >>>>
>>>> >>> >> >> >> >> >>>>
>>>> >>> >> >> >> >> >>>> Is target-dir necessary for the <source-file>
>>>> >>>element? For
>>>> >>> >> >>Java
>>>> >>> >> >> >> >>files,
>>>> >>> >> >> >> >> >>>>the
>>>> >>> >> >> >> >> >>>> tooling could take a peak inside the .java file and
>>>> >>> >>extract
>>>> >>> >> >>out
>>>> >>> >> >> >>the
>>>> >>> >> >> >> >> >>>> package name from the file, no? Phonegap build
>>>>already
>>>> >>> >>does
>>>> >>> >> >>this
>>>> >>> >> >> >> >> >>>>doesn't
>>>> >>> >> >> >> >> >>>> it?
>>>> >>> >> >> >> >> >>>>
>>>> >>> >> >> >> >> >>>> PhoneGap Build did do this, but no longer supports
>>>> >>> >>uploading
>>>> >>> >> >> >> >>arbitrary
>>>> >>> >> >> >> >> >>>>Java files. Only plugins with a manifest are
>>>>supported.
>>>> >>> >> >> >> >> >>>>
>>>> >>> >> >> >> >> >>>> I'm torn - one of the goals of this format is to
>>>>make
>>>> >>>it
>>>> >>> >>as
>>>> >>> >> >> >>easy as
>>>> >>> >> >> >> >> >>>>possible to write tools that use it as possible.
>>>>Right
>>>> >>> >>now, a
>>>> >>> >> >> >>tool
>>>> >>> >> >> >> >> >>>>reads
>>>> >>> >> >> >> >> >>>>one file (plugin.xml) and moves source files
>>>>(ignoring
>>>> >>> >>config
>>>> >>> >> >> >>files
>>>> >>> >> >> >> >>for
>>>> >>> >> >> >> >> >>>>the moment). I'd prefer it wasn't "read one file,
>>>>then
>>>> >>>read
>>>> >>> >> >>each
>>>> >>> >> >> >> >>.java
>>>> >>> >> >> >> >> >>>>file to discover where to move it".
>>>> >>> >> >> >> >> >>>>
>>>> >>> >> >> >> >> >>>> One option is to use the id attribute on the
>>>>top-level
>>>> >>> >>plugin
>>>> >>> >> >> >> >>element
>>>> >>> >> >> >> >> >>>>to resolve the path, but that doesn't handle the
>>>>case
>>>> >>>where
>>>> >>> >> >> >> >>different
>>>> >>> >> >> >> >> >>>>Java files will have different paths. I wonder if
>>>> >>>there are
>>>> >>> >> >>more
>>>> >>> >> >> >> >> >>>>complex
>>>> >>> >> >> >> >> >>>>plugins around we can try to convert to see where
>>>>the
>>>> >>>pain
>>>> >>> >> >>points
>>>> >>> >> >> >> >>are.
>>>> >>> >> >> >> >> >>>>
>>>> >>> >> >> >> >> >>>>
>>>> >>> >> >> >> >> >>>> Adding the ability to modify existing parts of a
>>>> >>>native
>>>> >>> >> >> >>platform's
>>>> >>> >> >> >> >> >>>>config
>>>> >>> >> >> >> >> >>>> document to the <config-file> portion might be
>>>> >>>needed..
>>>> >>> >> >>Although
>>>> >>> >> >> >> >>Ive
>>>> >>> >> >> >> >> >>>>yet
>>>> >>> >> >> >> >> >>>> to dig up a use case. Will dig around more.
>>>> >>> >> >> >> >> >>>>
>>>> >>> >> >> >> >> >>>> Agreed - also things like target OS/SDK versions
>>>>may
>>>> >>>be
>>>> >>> >> >> >>required by
>>>> >>> >> >> >> >> >>>>certain plugins (i.e. this plugin uses an iOS 6 API,
>>>> >>>so we
>>>> >>> >> >>need
>>>> >>> >> >> >>to
>>>> >>> >> >> >> >> >>>>update your project to iOS 6). Probably the best
>>>> >>>approach
>>>> >>> >> >>there
>>>> >>> >> >> >>is
>>>> >>> >> >> >> >>to
>>>> >>> >> >> >> >> >>>>warn/prompt the user before proceeding.
>>>> >>> >> >> >> >> >>>>
>>>> >>> >> >> >> >> >>>> +1 agree that <resource-file> and <header-file> is
>>>> >>> >>redundant.
>>>> >>> >> >> >> >>Tooling
>>>> >>> >> >> >> >> >>>> should be able to distinguish this so merging with
>>>> >>> >> >><source-file>
>>>> >>> >> >> >> >> >>>>makes a
>>>> >>> >> >> >> >> >>>> lot of sense.
>>>> >>> >> >> >> >> >>>>
>>>> >>> >> >> >> >> >>>> Looking good!
>>>> >>> >> >> >> >> >>>>
>>>> >>> >> >> >> >> >>>> On 6/8/12 6:40 PM, "Andrew Lunny"
>>>> >>> >> >> >> >> >>>><al...@gmail.com>> wrote:
>>>> >>> >> >> >> >> >>>>
>>>> >>> >> >> >> >> >>>>>Hi all,
>>>> >>> >> >> >> >> >>>>>
>>>> >>> >> >> >> >> >>>>>I've posted to this list before about
>>>>pluginstall[1],
>>>> >>>the
>>>> >>> >> >>tool
>>>> >>> >> >> >>I've
>>>> >>> >> >> >> >> >>>>>developed as part of working on PhoneGap Build and
>>>> >>> >>requiring
>>>> >>> >> >> >> >> >>>>>programmatic
>>>> >>> >> >> >> >> >>>>>installation of Cordova plugins.
>>>> >>> >> >> >> >> >>>>>
>>>> >>> >> >> >> >> >>>>>I've now written up a spec for the format that
>>>> >>>pluginstall
>>>> >>> >> >>uses
>>>> >>> >> >> >>- I
>>>> >>> >> >> >> >> >>>>>think
>>>> >>> >> >> >> >> >>>>>it's generally useful for Cordova plugin
>>>>installation
>>>> >>>and
>>>> >>> >> >> >> >> >>>>>manipulation.
>>>> >>> >> >> >> >> >>>>>The
>>>> >>> >> >> >> >> >>>>>spec is available on GitHub:
>>>> >>> >> >> >> >> >>>>>https://github.com/alunny/cordova-plugin-spec
>>>> >>> >> >> >> >> >>>>>
>>>> >>> >> >> >> >> >>>>>Issues and/or pull requests and/or forks welcome.
>>>> >>> >> >> >> >> >>>>>
>>>> >>> >> >> >> >> >>>>>Cheers,
>>>> >>> >> >> >> >> >>>>>Andrew
>>>> >>> >> >> >> >> >>>>>
>>>> >>> >> >> >> >> >>>>>[1] https://github.com/alunny/pluginstall
>>>> >>> >> >> >> >> >>>>
>>>> >>> >> >> >> >> >>>>
>>>> >>> >> >> >> >> >>
>>>> >>> >> >> >> >>
>>>> >>> >> >> >> >>
>>>> >>> >> >> >>
>>>> >>> >> >> >>
>>>> >>> >> >>
>>>> >>> >> >>
>>>> >>> >>
>>>> >>> >>
>>>> >>>
>>>> >>>
>>>> >>
>>>> >>
>>>> >> --
>>>> >> @purplecabbage
>>>> >> risingj.com
>>>>
>>>>
>>>
>>>
>>>--
>>>@purplecabbage
>>>risingj.com
>>

Re: Plugin Format and Spec

Posted by Shazron <sh...@gmail.com>.
It's definitely a blocker IMO. 0.8 is the latest shipped version, and
it doesn't work with it.
Maybe you'll disagree, but users will.

On Mon, Jun 25, 2012 at 4:36 PM, Filip Maj <fi...@adobe.com> wrote:
> Yep, 0.6.8.
>
> $ node -v
> v0.6.8
>
>
> On 6/25/12 4:32 PM, "Jesse" <pu...@gmail.com> wrote:
>
>>0.6.8 ? Is your toaster unplugged Fil?
>>I am in windows and running without issue :
>>$ node -v => v0.6.18
>>
>>
>>On Mon, Jun 25, 2012 at 4:29 PM, Filip Maj <fi...@adobe.com> wrote:
>>
>>> I wouldn¹t call that a blocker..
>>>
>>> Pluginstall works fine with node 0.6.8 too.
>>>
>>> I was using 0.6.6, some dependencies in pluginstall require at least
>>>node
>>> 0.6.7, so I upgraded to 0.6.8. Works fine.
>>>
>>> On 6/25/12 3:59 PM, "Shazron" <sh...@gmail.com> wrote:
>>>
>>> >pluginstall blocker:
>>> >https://github.com/alunny/node-xcode/issues/3
>>> >https://issues.apache.org/jira/browse/CB-631
>>> >
>>> >Only works with node 0.6.17
>>> >
>>> >
>>> >On Mon, Jun 25, 2012 at 2:09 PM, Jesse <pu...@gmail.com> wrote:
>>> >> We could use an 'engine' type specification similar to npm :
>>> >> "engine": "node >= 0.4.1"
>>> >>
>>> >>
>>> >>
>>>
>>>http://blog.nodejs.org/2012/02/27/managing-node-js-dependencies-with-shri
>>> >>nkwrap/
>>> >>
>>> >>
>>> >> On Mon, Jun 25, 2012 at 2:02 PM, Filip Maj <fi...@adobe.com> wrote:
>>> >>
>>> >>> Ideally, I would think we do NOT plan on doing that post-2.0. That
>>> >>>said,
>>> >>> our current deprecation policy, last I checked, was "6 months from
>>> >>>now",
>>> >>> which does not guarantee that the API will not change between minor
>>> >>> revisions.
>>> >>>
>>> >>> Thus, the conversation turns back to project versioning and
>>> >>>deprecation.
>>> >>>
>>> >>> Mike and I spoke about this this morning. I think both of us support
>>> >>>the
>>> >>> idea of moving to semantic versioning for 2.0 and beyond.
>>> >>>
>>> >>> On 6/25/12 1:45 PM, "Anis KADRI" <an...@gmail.com> wrote:
>>> >>>
>>> >>> >Agreed fil, but are we planning on doing that for future releases ?
>>> >>>If yes
>>> >>> >that YAH we should support versions and the solution you described
>>>is
>>> >>> >certainly an option. But if I were a plugin developer, I would not
>>> >>>want to
>>> >>> >update it every month to keep up with Cordova releases.
>>> >>> >I don't disagree that there could be an Cordova version in the
>>> >>>manifest
>>> >>> >file that allows plugin developers to target a specific version of
>>> >>>Cordova
>>> >>> >(which would mean that the plugin was tested with that version but
>>> >>>might
>>> >>> >also work with newer versions).
>>> >>> >
>>> >>> >On Mon, Jun 25, 2012 at 1:33 PM, Filip Maj <fi...@adobe.com> wrote:
>>> >>> >
>>> >>> >> Yes, it has changed every month. Pretty much every minor revision
>>> >>>from
>>> >>> >>1.0
>>> >>> >> to 1.9 has changed the API (at least on Android).
>>> >>> >>
>>> >>> >> On 6/25/12 1:26 PM, "Anis KADRI" <an...@gmail.com> wrote:
>>> >>> >>
>>> >>> >> >Right but does the plugin interface change every month too ? A
>>> >>>plugin
>>> >>> >>that
>>> >>> >> >works with Cordova 1.x.x is not supposed to work with Cordova
>>> >>>1.y.y ?
>>> >>> >> >
>>> >>> >> >On Mon, Jun 25, 2012 at 1:18 PM, Filip Maj <fi...@adobe.com>
>>>wrote:
>>> >>> >> >
>>> >>> >> >> You don't see any reason why plugins should support different
>>> >>> >>versions
>>> >>> >> >>of
>>> >>> >> >> cordova? Cordova gets released every month. This seems like a
>>> >>>pretty
>>> >>> >> >> important thing to figure out IMO
>>> >>> >> >>
>>> >>> >> >> On 6/25/12 1:12 PM, "Anis KADRI" <an...@gmail.com> wrote:
>>> >>> >> >>
>>> >>> >> >> >I think we should agree on a spec (plugin package and plugin
>>> >>> >>interface)
>>> >>> >> >> >and
>>> >>> >> >> >stick to it. As long as we don't break the plugin interface,
>>>I
>>> >>>don't
>>> >>> >> >>see
>>> >>> >> >> >any reason why plugins should support multiple versions of
>>> >>>Cordova.
>>> >>> >>If
>>> >>> >> >> >there are any, I'd love to hear them.
>>> >>> >> >> >
>>> >>> >> >> >On Mon, Jun 25, 2012 at 1:01 PM, Filip Maj <fi...@adobe.com>
>>> >>>wrote:
>>> >>> >> >> >
>>> >>> >> >> >> Back onto the versioning question..
>>> >>> >> >> >>
>>> >>> >> >> >> 1. Do we want to support different version of the cordova
>>> >>> >>framework
>>> >>> >> >>in
>>> >>> >> >> >> plugins, within a single repo, across versions that changed
>>> >>>the
>>> >>> >> >> >> native/javascript plugin API?
>>> >>> >> >> >> 2. How?
>>> >>> >> >> >>
>>> >>> >> >> >> If the answer to (1) is yes, one idea for (2) might be
>>>nesting
>>> >>> >> >>another
>>> >>> >> >> >> directory level in the all of the source directories that
>>> >>>contains
>>> >>> >> >>the
>>> >>> >> >> >> version number supported. For example:
>>> >>> >> >> >>
>>> >>> >> >> >> src/android/1.5.0/*.java
>>> >>> >> >> >> src/android/1.8.1/*.java
>>> >>> >> >> >> www/1.5.0/childbrowser.js
>>> >>> >> >> >> www/1.8.1/childbrowser.js
>>> >>> >> >> >>
>>> >>> >> >> >> Could get gnarly real quick though. Another, cleaner
>>> >>> >>implementation
>>> >>> >> >>in
>>> >>> >> >> >> terms of file system "noise" might be to employ a git
>>>branches
>>> >>> >> >> >> convention.. But that would enforce a git dependency.
>>> >>> >> >> >>
>>> >>> >> >> >> Just brainstorming / thinking out loud. Both are probably
>>>bad
>>> >>> >>ideas
>>> >>> >> >>:)
>>> >>> >> >> >>
>>> >>> >> >> >> On 6/25/12 11:41 AM, "Michael Brooks"
>>> >>><mi...@michaelbrooks.ca>
>>> >>> >> >>wrote:
>>> >>> >> >> >>
>>> >>> >> >> >> >We may also want to describe testing from JavaScript and
>>> >>>Native.
>>> >>> >> >> >> >
>>> >>> >> >> >> >I would also like to see a repository called
>>> >>> >> >>"cordova-plugin-template"
>>> >>> >> >> >> >that
>>> >>> >> >> >> >is a boilerplate to start writing any plugin. The idea is
>>> >>>that
>>> >>> >>users
>>> >>> >> >> >>start
>>> >>> >> >> >> >with something that works, with tests, and documentation
>>> >>> >> >>boilerplate -
>>> >>> >> >> >> >perhaps it can be an echo plugin since that has a minimal
>>> >>> >>footprint.
>>> >>> >> >> >> >
>>> >>> >> >> >> >On Mon, Jun 25, 2012 at 11:28 AM, Filip Maj
>>><fi...@adobe.com>
>>> >>> >>wrote:
>>> >>> >> >> >> >
>>> >>> >> >> >> >> Looks great. I'll add some detail to the list you have
>>> >>>here.
>>> >>> >>I'd
>>> >>> >> >> >> >>recommend
>>> >>> >> >> >> >> tweaking the order a little bit; introducing the JS
>>>before
>>> >>>the
>>> >>> >> >>native
>>> >>> >> >> >> >>APIs.
>>> >>> >> >> >> >>
>>> >>> >> >> >> >> # Plugin Author Guide
>>> >>> >> >> >> >>
>>> >>> >> >> >> >> - plugin package format -> points to Andrew's plugin
>>>spec
>>> >>> >> >> >> >> - js api
>>> >>> >> >> >> >> --- basically documenting exec(). Service, action,
>>> >>>callbacks,
>>> >>> >> >> >>arguments.
>>> >>> >> >> >> >> What about how arguments are translated from JS types
>>> >>>(string,
>>> >>> >> >> >>number,
>>> >>> >> >> >> >> objects, etc) to native types for each platform?
>>> >>> >> >> >> >>
>>> >>> >> >> >> >> - native api
>>> >>> >> >> >> >> --- ios
>>> >>> >> >> >> >> --- android
>>> >>> >> >> >> >> --- blackberry
>>> >>> >> >> >> >> --- windowsphone
>>> >>> >> >> >> >> --- bada
>>> >>> >> >> >> >>
>>> >>> >> >> >> >>
>>> >>> >> >> >> >> On 6/25/12 11:16 AM, "Brian LeRoux" <b...@brian.io> wrote:
>>> >>> >> >> >> >>
>>> >>> >> >> >> >> >Biggest question is how to document. My thinking is
>>>that
>>> >>>we
>>> >>> >>want
>>> >>> >> >>to
>>> >>> >> >> >> >> >specify the PluginPackage so that PluginInstall works.
>>>So
>>> >>>the
>>> >>> >> >>docs
>>> >>> >> >> >> >> >would read like this:
>>> >>> >> >> >> >> >
>>> >>> >> >> >> >> ># Plugin Author Guide
>>> >>> >> >> >> >> >
>>> >>> >> >> >> >> >- plugin package format
>>> >>> >> >> >> >> >- native api
>>> >>> >> >> >> >> >--- ios
>>> >>> >> >> >> >> >--- android
>>> >>> >> >> >> >> >--- blackberry
>>> >>> >> >> >> >> >--- windowsphone
>>> >>> >> >> >> >> >--- bada
>>> >>> >> >> >> >> >- js api
>>> >>> >> >> >> >> >
>>> >>> >> >> >> >> >Thoughts? (If this looks good I will update the issue.)
>>> >>> >> >> >> >> >
>>> >>> >> >> >> >> >
>>> >>> >> >> >> >> >
>>> >>> >> >> >> >> >On Mon, Jun 25, 2012 at 10:50 AM, Filip Maj
>>> >>><fi...@adobe.com>
>>> >>> >> >>wrote:
>>> >>> >> >> >> >> >> Hah Michael and I were just talking about that..
>>> >>> >> >> >> >> >>
>>> >>> >> >> >> >> >> I will send a pull request to Andrew's draft spec
>>> >>> >> >> >> >> >>
>>> >>> >> >> >> >> >> On 6/25/12 10:46 AM, "Brian LeRoux" <b...@brian.io>
>>>wrote:
>>> >>> >> >> >> >> >>
>>> >>> >> >> >> >> >>>npm does this w/ an 'engines' attribute on
>>>package.json
>>> >>> >> >> >> >> >>>
>>> >>> >> >> >> >> >>>On Mon, Jun 25, 2012 at 10:26 AM, Filip Maj
>>> >>><fi...@adobe.com>
>>> >>> >> >> wrote:
>>> >>> >> >> >> >> >>>> One more thing that came to mind is how to support
>>> >>> >>different
>>> >>> >> >> >> >>versions
>>> >>> >> >> >> >> >>>>of Cordova? Any ideas?
>>> >>> >> >> >> >> >>>>
>>> >>> >> >> >> >> >>>> From: Andrew Lunny
>>> >>> >> >><al...@gmail.com>>
>>> >>> >> >> >> >> >>>> Reply-To:
>>>"alunny@gmail.com<ma...@gmail.com>"
>>> >>> >> >> >> >> >>>><al...@gmail.com>>
>>> >>> >> >> >> >> >>>> To: Default User Nam
>>> >>><fil@adobe.com<mailto:fil@adobe.com
>>> >>> >>
>>> >>> >> >> >> >> >>>> Cc:
>>> >>> >> >> >> >> >>>>"callback-dev@incubator.apache.org<mailto:
>>> >>> >> >> >> >> callback-dev@incubator.apache
>>> >>> >> >> >> >> >>>>.o
>>> >>> >> >> >> >> >>>>rg>"
>>> >>> >> >> >> >> >>>><callback-dev@incubator.apache.org<mailto:
>>> >>> >> >> >> >> callback-dev@incubator.apache
>>> >>> >> >> >> >> >>>>.o
>>> >>> >> >> >> >> >>>>rg>>
>>> >>> >> >> >> >> >>>> Subject: Re: Plugin Format and Spec
>>> >>> >> >> >> >> >>>>
>>> >>> >> >> >> >> >>>>
>>> >>> >> >> >> >> >>>>
>>> >>> >> >> >> >> >>>> On 11 June 2012 13:50, Filip Maj
>>> >>> >> >> >> >><fil@adobe.com<mailto:fil@adobe.com
>>> >>> >> >> >> >> >>
>>> >>> >> >> >> >> >>>>wrote:
>>> >>> >> >> >> >> >>>> Nice work Andrew! I suggest taking this and moving
>>>to
>>> >>>a
>>> >>> >> >>cordova
>>> >>> >> >> >> >>wiki
>>> >>> >> >> >> >> >>>>page
>>> >>> >> >> >> >> >>>> (assuming all committers are on board to adopting
>>> >>>this as
>>> >>> >>the
>>> >>> >> >> >>basis
>>> >>> >> >> >> >> >>>>for
>>> >>> >> >> >> >> >>>>a
>>> >>> >> >> >> >> >>>> plugin spec)
>>> >>> >> >> >> >> >>>>
>>> >>> >> >> >> >> >>>> A link on the Cordova wiki is probably the best
>>>place
>>> >>>to
>>> >>> >> >>start
>>> >>> >> >> >>- we
>>> >>> >> >> >> >> >>>>can
>>> >>> >> >> >> >> >>>>get some more feedback from plugin authors and app
>>> >>> >>developers
>>> >>> >> >> >>(i.e.
>>> >>> >> >> >> >> >>>>keep
>>> >>> >> >> >> >> >>>>this as "a way to write plugins" rather than "the
>>> >>>official
>>> >>> >> >>way to
>>> >>> >> >> >> >>write
>>> >>> >> >> >> >> >>>>plugins").
>>> >>> >> >> >> >> >>>>
>>> >>> >> >> >> >> >>>>
>>> >>> >> >> >> >> >>>> Is target-dir necessary for the <source-file>
>>> >>>element? For
>>> >>> >> >>Java
>>> >>> >> >> >> >>files,
>>> >>> >> >> >> >> >>>>the
>>> >>> >> >> >> >> >>>> tooling could take a peak inside the .java file and
>>> >>> >>extract
>>> >>> >> >>out
>>> >>> >> >> >>the
>>> >>> >> >> >> >> >>>> package name from the file, no? Phonegap build
>>>already
>>> >>> >>does
>>> >>> >> >>this
>>> >>> >> >> >> >> >>>>doesn't
>>> >>> >> >> >> >> >>>> it?
>>> >>> >> >> >> >> >>>>
>>> >>> >> >> >> >> >>>> PhoneGap Build did do this, but no longer supports
>>> >>> >>uploading
>>> >>> >> >> >> >>arbitrary
>>> >>> >> >> >> >> >>>>Java files. Only plugins with a manifest are
>>>supported.
>>> >>> >> >> >> >> >>>>
>>> >>> >> >> >> >> >>>> I'm torn - one of the goals of this format is to
>>>make
>>> >>>it
>>> >>> >>as
>>> >>> >> >> >>easy as
>>> >>> >> >> >> >> >>>>possible to write tools that use it as possible.
>>>Right
>>> >>> >>now, a
>>> >>> >> >> >>tool
>>> >>> >> >> >> >> >>>>reads
>>> >>> >> >> >> >> >>>>one file (plugin.xml) and moves source files
>>>(ignoring
>>> >>> >>config
>>> >>> >> >> >>files
>>> >>> >> >> >> >>for
>>> >>> >> >> >> >> >>>>the moment). I'd prefer it wasn't "read one file,
>>>then
>>> >>>read
>>> >>> >> >>each
>>> >>> >> >> >> >>.java
>>> >>> >> >> >> >> >>>>file to discover where to move it".
>>> >>> >> >> >> >> >>>>
>>> >>> >> >> >> >> >>>> One option is to use the id attribute on the
>>>top-level
>>> >>> >>plugin
>>> >>> >> >> >> >>element
>>> >>> >> >> >> >> >>>>to resolve the path, but that doesn't handle the
>>>case
>>> >>>where
>>> >>> >> >> >> >>different
>>> >>> >> >> >> >> >>>>Java files will have different paths. I wonder if
>>> >>>there are
>>> >>> >> >>more
>>> >>> >> >> >> >> >>>>complex
>>> >>> >> >> >> >> >>>>plugins around we can try to convert to see where
>>>the
>>> >>>pain
>>> >>> >> >>points
>>> >>> >> >> >> >>are.
>>> >>> >> >> >> >> >>>>
>>> >>> >> >> >> >> >>>>
>>> >>> >> >> >> >> >>>> Adding the ability to modify existing parts of a
>>> >>>native
>>> >>> >> >> >>platform's
>>> >>> >> >> >> >> >>>>config
>>> >>> >> >> >> >> >>>> document to the <config-file> portion might be
>>> >>>needed..
>>> >>> >> >>Although
>>> >>> >> >> >> >>Ive
>>> >>> >> >> >> >> >>>>yet
>>> >>> >> >> >> >> >>>> to dig up a use case. Will dig around more.
>>> >>> >> >> >> >> >>>>
>>> >>> >> >> >> >> >>>> Agreed - also things like target OS/SDK versions
>>>may
>>> >>>be
>>> >>> >> >> >>required by
>>> >>> >> >> >> >> >>>>certain plugins (i.e. this plugin uses an iOS 6 API,
>>> >>>so we
>>> >>> >> >>need
>>> >>> >> >> >>to
>>> >>> >> >> >> >> >>>>update your project to iOS 6). Probably the best
>>> >>>approach
>>> >>> >> >>there
>>> >>> >> >> >>is
>>> >>> >> >> >> >>to
>>> >>> >> >> >> >> >>>>warn/prompt the user before proceeding.
>>> >>> >> >> >> >> >>>>
>>> >>> >> >> >> >> >>>> +1 agree that <resource-file> and <header-file> is
>>> >>> >>redundant.
>>> >>> >> >> >> >>Tooling
>>> >>> >> >> >> >> >>>> should be able to distinguish this so merging with
>>> >>> >> >><source-file>
>>> >>> >> >> >> >> >>>>makes a
>>> >>> >> >> >> >> >>>> lot of sense.
>>> >>> >> >> >> >> >>>>
>>> >>> >> >> >> >> >>>> Looking good!
>>> >>> >> >> >> >> >>>>
>>> >>> >> >> >> >> >>>> On 6/8/12 6:40 PM, "Andrew Lunny"
>>> >>> >> >> >> >> >>>><al...@gmail.com>> wrote:
>>> >>> >> >> >> >> >>>>
>>> >>> >> >> >> >> >>>>>Hi all,
>>> >>> >> >> >> >> >>>>>
>>> >>> >> >> >> >> >>>>>I've posted to this list before about
>>>pluginstall[1],
>>> >>>the
>>> >>> >> >>tool
>>> >>> >> >> >>I've
>>> >>> >> >> >> >> >>>>>developed as part of working on PhoneGap Build and
>>> >>> >>requiring
>>> >>> >> >> >> >> >>>>>programmatic
>>> >>> >> >> >> >> >>>>>installation of Cordova plugins.
>>> >>> >> >> >> >> >>>>>
>>> >>> >> >> >> >> >>>>>I've now written up a spec for the format that
>>> >>>pluginstall
>>> >>> >> >>uses
>>> >>> >> >> >>- I
>>> >>> >> >> >> >> >>>>>think
>>> >>> >> >> >> >> >>>>>it's generally useful for Cordova plugin
>>>installation
>>> >>>and
>>> >>> >> >> >> >> >>>>>manipulation.
>>> >>> >> >> >> >> >>>>>The
>>> >>> >> >> >> >> >>>>>spec is available on GitHub:
>>> >>> >> >> >> >> >>>>>https://github.com/alunny/cordova-plugin-spec
>>> >>> >> >> >> >> >>>>>
>>> >>> >> >> >> >> >>>>>Issues and/or pull requests and/or forks welcome.
>>> >>> >> >> >> >> >>>>>
>>> >>> >> >> >> >> >>>>>Cheers,
>>> >>> >> >> >> >> >>>>>Andrew
>>> >>> >> >> >> >> >>>>>
>>> >>> >> >> >> >> >>>>>[1] https://github.com/alunny/pluginstall
>>> >>> >> >> >> >> >>>>
>>> >>> >> >> >> >> >>>>
>>> >>> >> >> >> >> >>
>>> >>> >> >> >> >>
>>> >>> >> >> >> >>
>>> >>> >> >> >>
>>> >>> >> >> >>
>>> >>> >> >>
>>> >>> >> >>
>>> >>> >>
>>> >>> >>
>>> >>>
>>> >>>
>>> >>
>>> >>
>>> >> --
>>> >> @purplecabbage
>>> >> risingj.com
>>>
>>>
>>
>>
>>--
>>@purplecabbage
>>risingj.com
>

Re: Plugin Format and Spec

Posted by Filip Maj <fi...@adobe.com>.
Yep, 0.6.8.

$ node -v
v0.6.8


On 6/25/12 4:32 PM, "Jesse" <pu...@gmail.com> wrote:

>0.6.8 ? Is your toaster unplugged Fil?
>I am in windows and running without issue :
>$ node -v => v0.6.18
>
>
>On Mon, Jun 25, 2012 at 4:29 PM, Filip Maj <fi...@adobe.com> wrote:
>
>> I wouldn¹t call that a blocker..
>>
>> Pluginstall works fine with node 0.6.8 too.
>>
>> I was using 0.6.6, some dependencies in pluginstall require at least
>>node
>> 0.6.7, so I upgraded to 0.6.8. Works fine.
>>
>> On 6/25/12 3:59 PM, "Shazron" <sh...@gmail.com> wrote:
>>
>> >pluginstall blocker:
>> >https://github.com/alunny/node-xcode/issues/3
>> >https://issues.apache.org/jira/browse/CB-631
>> >
>> >Only works with node 0.6.17
>> >
>> >
>> >On Mon, Jun 25, 2012 at 2:09 PM, Jesse <pu...@gmail.com> wrote:
>> >> We could use an 'engine' type specification similar to npm :
>> >> "engine": "node >= 0.4.1"
>> >>
>> >>
>> >>
>>
>>http://blog.nodejs.org/2012/02/27/managing-node-js-dependencies-with-shri
>> >>nkwrap/
>> >>
>> >>
>> >> On Mon, Jun 25, 2012 at 2:02 PM, Filip Maj <fi...@adobe.com> wrote:
>> >>
>> >>> Ideally, I would think we do NOT plan on doing that post-2.0. That
>> >>>said,
>> >>> our current deprecation policy, last I checked, was "6 months from
>> >>>now",
>> >>> which does not guarantee that the API will not change between minor
>> >>> revisions.
>> >>>
>> >>> Thus, the conversation turns back to project versioning and
>> >>>deprecation.
>> >>>
>> >>> Mike and I spoke about this this morning. I think both of us support
>> >>>the
>> >>> idea of moving to semantic versioning for 2.0 and beyond.
>> >>>
>> >>> On 6/25/12 1:45 PM, "Anis KADRI" <an...@gmail.com> wrote:
>> >>>
>> >>> >Agreed fil, but are we planning on doing that for future releases ?
>> >>>If yes
>> >>> >that YAH we should support versions and the solution you described
>>is
>> >>> >certainly an option. But if I were a plugin developer, I would not
>> >>>want to
>> >>> >update it every month to keep up with Cordova releases.
>> >>> >I don't disagree that there could be an Cordova version in the
>> >>>manifest
>> >>> >file that allows plugin developers to target a specific version of
>> >>>Cordova
>> >>> >(which would mean that the plugin was tested with that version but
>> >>>might
>> >>> >also work with newer versions).
>> >>> >
>> >>> >On Mon, Jun 25, 2012 at 1:33 PM, Filip Maj <fi...@adobe.com> wrote:
>> >>> >
>> >>> >> Yes, it has changed every month. Pretty much every minor revision
>> >>>from
>> >>> >>1.0
>> >>> >> to 1.9 has changed the API (at least on Android).
>> >>> >>
>> >>> >> On 6/25/12 1:26 PM, "Anis KADRI" <an...@gmail.com> wrote:
>> >>> >>
>> >>> >> >Right but does the plugin interface change every month too ? A
>> >>>plugin
>> >>> >>that
>> >>> >> >works with Cordova 1.x.x is not supposed to work with Cordova
>> >>>1.y.y ?
>> >>> >> >
>> >>> >> >On Mon, Jun 25, 2012 at 1:18 PM, Filip Maj <fi...@adobe.com>
>>wrote:
>> >>> >> >
>> >>> >> >> You don't see any reason why plugins should support different
>> >>> >>versions
>> >>> >> >>of
>> >>> >> >> cordova? Cordova gets released every month. This seems like a
>> >>>pretty
>> >>> >> >> important thing to figure out IMO
>> >>> >> >>
>> >>> >> >> On 6/25/12 1:12 PM, "Anis KADRI" <an...@gmail.com> wrote:
>> >>> >> >>
>> >>> >> >> >I think we should agree on a spec (plugin package and plugin
>> >>> >>interface)
>> >>> >> >> >and
>> >>> >> >> >stick to it. As long as we don't break the plugin interface,
>>I
>> >>>don't
>> >>> >> >>see
>> >>> >> >> >any reason why plugins should support multiple versions of
>> >>>Cordova.
>> >>> >>If
>> >>> >> >> >there are any, I'd love to hear them.
>> >>> >> >> >
>> >>> >> >> >On Mon, Jun 25, 2012 at 1:01 PM, Filip Maj <fi...@adobe.com>
>> >>>wrote:
>> >>> >> >> >
>> >>> >> >> >> Back onto the versioning question..
>> >>> >> >> >>
>> >>> >> >> >> 1. Do we want to support different version of the cordova
>> >>> >>framework
>> >>> >> >>in
>> >>> >> >> >> plugins, within a single repo, across versions that changed
>> >>>the
>> >>> >> >> >> native/javascript plugin API?
>> >>> >> >> >> 2. How?
>> >>> >> >> >>
>> >>> >> >> >> If the answer to (1) is yes, one idea for (2) might be
>>nesting
>> >>> >> >>another
>> >>> >> >> >> directory level in the all of the source directories that
>> >>>contains
>> >>> >> >>the
>> >>> >> >> >> version number supported. For example:
>> >>> >> >> >>
>> >>> >> >> >> src/android/1.5.0/*.java
>> >>> >> >> >> src/android/1.8.1/*.java
>> >>> >> >> >> www/1.5.0/childbrowser.js
>> >>> >> >> >> www/1.8.1/childbrowser.js
>> >>> >> >> >>
>> >>> >> >> >> Could get gnarly real quick though. Another, cleaner
>> >>> >>implementation
>> >>> >> >>in
>> >>> >> >> >> terms of file system "noise" might be to employ a git
>>branches
>> >>> >> >> >> convention.. But that would enforce a git dependency.
>> >>> >> >> >>
>> >>> >> >> >> Just brainstorming / thinking out loud. Both are probably
>>bad
>> >>> >>ideas
>> >>> >> >>:)
>> >>> >> >> >>
>> >>> >> >> >> On 6/25/12 11:41 AM, "Michael Brooks"
>> >>><mi...@michaelbrooks.ca>
>> >>> >> >>wrote:
>> >>> >> >> >>
>> >>> >> >> >> >We may also want to describe testing from JavaScript and
>> >>>Native.
>> >>> >> >> >> >
>> >>> >> >> >> >I would also like to see a repository called
>> >>> >> >>"cordova-plugin-template"
>> >>> >> >> >> >that
>> >>> >> >> >> >is a boilerplate to start writing any plugin. The idea is
>> >>>that
>> >>> >>users
>> >>> >> >> >>start
>> >>> >> >> >> >with something that works, with tests, and documentation
>> >>> >> >>boilerplate -
>> >>> >> >> >> >perhaps it can be an echo plugin since that has a minimal
>> >>> >>footprint.
>> >>> >> >> >> >
>> >>> >> >> >> >On Mon, Jun 25, 2012 at 11:28 AM, Filip Maj
>><fi...@adobe.com>
>> >>> >>wrote:
>> >>> >> >> >> >
>> >>> >> >> >> >> Looks great. I'll add some detail to the list you have
>> >>>here.
>> >>> >>I'd
>> >>> >> >> >> >>recommend
>> >>> >> >> >> >> tweaking the order a little bit; introducing the JS
>>before
>> >>>the
>> >>> >> >>native
>> >>> >> >> >> >>APIs.
>> >>> >> >> >> >>
>> >>> >> >> >> >> # Plugin Author Guide
>> >>> >> >> >> >>
>> >>> >> >> >> >> - plugin package format -> points to Andrew's plugin
>>spec
>> >>> >> >> >> >> - js api
>> >>> >> >> >> >> --- basically documenting exec(). Service, action,
>> >>>callbacks,
>> >>> >> >> >>arguments.
>> >>> >> >> >> >> What about how arguments are translated from JS types
>> >>>(string,
>> >>> >> >> >>number,
>> >>> >> >> >> >> objects, etc) to native types for each platform?
>> >>> >> >> >> >>
>> >>> >> >> >> >> - native api
>> >>> >> >> >> >> --- ios
>> >>> >> >> >> >> --- android
>> >>> >> >> >> >> --- blackberry
>> >>> >> >> >> >> --- windowsphone
>> >>> >> >> >> >> --- bada
>> >>> >> >> >> >>
>> >>> >> >> >> >>
>> >>> >> >> >> >> On 6/25/12 11:16 AM, "Brian LeRoux" <b...@brian.io> wrote:
>> >>> >> >> >> >>
>> >>> >> >> >> >> >Biggest question is how to document. My thinking is
>>that
>> >>>we
>> >>> >>want
>> >>> >> >>to
>> >>> >> >> >> >> >specify the PluginPackage so that PluginInstall works.
>>So
>> >>>the
>> >>> >> >>docs
>> >>> >> >> >> >> >would read like this:
>> >>> >> >> >> >> >
>> >>> >> >> >> >> ># Plugin Author Guide
>> >>> >> >> >> >> >
>> >>> >> >> >> >> >- plugin package format
>> >>> >> >> >> >> >- native api
>> >>> >> >> >> >> >--- ios
>> >>> >> >> >> >> >--- android
>> >>> >> >> >> >> >--- blackberry
>> >>> >> >> >> >> >--- windowsphone
>> >>> >> >> >> >> >--- bada
>> >>> >> >> >> >> >- js api
>> >>> >> >> >> >> >
>> >>> >> >> >> >> >Thoughts? (If this looks good I will update the issue.)
>> >>> >> >> >> >> >
>> >>> >> >> >> >> >
>> >>> >> >> >> >> >
>> >>> >> >> >> >> >On Mon, Jun 25, 2012 at 10:50 AM, Filip Maj
>> >>><fi...@adobe.com>
>> >>> >> >>wrote:
>> >>> >> >> >> >> >> Hah Michael and I were just talking about that..
>> >>> >> >> >> >> >>
>> >>> >> >> >> >> >> I will send a pull request to Andrew's draft spec
>> >>> >> >> >> >> >>
>> >>> >> >> >> >> >> On 6/25/12 10:46 AM, "Brian LeRoux" <b...@brian.io>
>>wrote:
>> >>> >> >> >> >> >>
>> >>> >> >> >> >> >>>npm does this w/ an 'engines' attribute on
>>package.json
>> >>> >> >> >> >> >>>
>> >>> >> >> >> >> >>>On Mon, Jun 25, 2012 at 10:26 AM, Filip Maj
>> >>><fi...@adobe.com>
>> >>> >> >> wrote:
>> >>> >> >> >> >> >>>> One more thing that came to mind is how to support
>> >>> >>different
>> >>> >> >> >> >>versions
>> >>> >> >> >> >> >>>>of Cordova? Any ideas?
>> >>> >> >> >> >> >>>>
>> >>> >> >> >> >> >>>> From: Andrew Lunny
>> >>> >> >><al...@gmail.com>>
>> >>> >> >> >> >> >>>> Reply-To:
>>"alunny@gmail.com<ma...@gmail.com>"
>> >>> >> >> >> >> >>>><al...@gmail.com>>
>> >>> >> >> >> >> >>>> To: Default User Nam
>> >>><fil@adobe.com<mailto:fil@adobe.com
>> >>> >>
>> >>> >> >> >> >> >>>> Cc:
>> >>> >> >> >> >> >>>>"callback-dev@incubator.apache.org<mailto:
>> >>> >> >> >> >> callback-dev@incubator.apache
>> >>> >> >> >> >> >>>>.o
>> >>> >> >> >> >> >>>>rg>"
>> >>> >> >> >> >> >>>><callback-dev@incubator.apache.org<mailto:
>> >>> >> >> >> >> callback-dev@incubator.apache
>> >>> >> >> >> >> >>>>.o
>> >>> >> >> >> >> >>>>rg>>
>> >>> >> >> >> >> >>>> Subject: Re: Plugin Format and Spec
>> >>> >> >> >> >> >>>>
>> >>> >> >> >> >> >>>>
>> >>> >> >> >> >> >>>>
>> >>> >> >> >> >> >>>> On 11 June 2012 13:50, Filip Maj
>> >>> >> >> >> >><fil@adobe.com<mailto:fil@adobe.com
>> >>> >> >> >> >> >>
>> >>> >> >> >> >> >>>>wrote:
>> >>> >> >> >> >> >>>> Nice work Andrew! I suggest taking this and moving
>>to
>> >>>a
>> >>> >> >>cordova
>> >>> >> >> >> >>wiki
>> >>> >> >> >> >> >>>>page
>> >>> >> >> >> >> >>>> (assuming all committers are on board to adopting
>> >>>this as
>> >>> >>the
>> >>> >> >> >>basis
>> >>> >> >> >> >> >>>>for
>> >>> >> >> >> >> >>>>a
>> >>> >> >> >> >> >>>> plugin spec)
>> >>> >> >> >> >> >>>>
>> >>> >> >> >> >> >>>> A link on the Cordova wiki is probably the best
>>place
>> >>>to
>> >>> >> >>start
>> >>> >> >> >>- we
>> >>> >> >> >> >> >>>>can
>> >>> >> >> >> >> >>>>get some more feedback from plugin authors and app
>> >>> >>developers
>> >>> >> >> >>(i.e.
>> >>> >> >> >> >> >>>>keep
>> >>> >> >> >> >> >>>>this as "a way to write plugins" rather than "the
>> >>>official
>> >>> >> >>way to
>> >>> >> >> >> >>write
>> >>> >> >> >> >> >>>>plugins").
>> >>> >> >> >> >> >>>>
>> >>> >> >> >> >> >>>>
>> >>> >> >> >> >> >>>> Is target-dir necessary for the <source-file>
>> >>>element? For
>> >>> >> >>Java
>> >>> >> >> >> >>files,
>> >>> >> >> >> >> >>>>the
>> >>> >> >> >> >> >>>> tooling could take a peak inside the .java file and
>> >>> >>extract
>> >>> >> >>out
>> >>> >> >> >>the
>> >>> >> >> >> >> >>>> package name from the file, no? Phonegap build
>>already
>> >>> >>does
>> >>> >> >>this
>> >>> >> >> >> >> >>>>doesn't
>> >>> >> >> >> >> >>>> it?
>> >>> >> >> >> >> >>>>
>> >>> >> >> >> >> >>>> PhoneGap Build did do this, but no longer supports
>> >>> >>uploading
>> >>> >> >> >> >>arbitrary
>> >>> >> >> >> >> >>>>Java files. Only plugins with a manifest are
>>supported.
>> >>> >> >> >> >> >>>>
>> >>> >> >> >> >> >>>> I'm torn - one of the goals of this format is to
>>make
>> >>>it
>> >>> >>as
>> >>> >> >> >>easy as
>> >>> >> >> >> >> >>>>possible to write tools that use it as possible.
>>Right
>> >>> >>now, a
>> >>> >> >> >>tool
>> >>> >> >> >> >> >>>>reads
>> >>> >> >> >> >> >>>>one file (plugin.xml) and moves source files
>>(ignoring
>> >>> >>config
>> >>> >> >> >>files
>> >>> >> >> >> >>for
>> >>> >> >> >> >> >>>>the moment). I'd prefer it wasn't "read one file,
>>then
>> >>>read
>> >>> >> >>each
>> >>> >> >> >> >>.java
>> >>> >> >> >> >> >>>>file to discover where to move it".
>> >>> >> >> >> >> >>>>
>> >>> >> >> >> >> >>>> One option is to use the id attribute on the
>>top-level
>> >>> >>plugin
>> >>> >> >> >> >>element
>> >>> >> >> >> >> >>>>to resolve the path, but that doesn't handle the
>>case
>> >>>where
>> >>> >> >> >> >>different
>> >>> >> >> >> >> >>>>Java files will have different paths. I wonder if
>> >>>there are
>> >>> >> >>more
>> >>> >> >> >> >> >>>>complex
>> >>> >> >> >> >> >>>>plugins around we can try to convert to see where
>>the
>> >>>pain
>> >>> >> >>points
>> >>> >> >> >> >>are.
>> >>> >> >> >> >> >>>>
>> >>> >> >> >> >> >>>>
>> >>> >> >> >> >> >>>> Adding the ability to modify existing parts of a
>> >>>native
>> >>> >> >> >>platform's
>> >>> >> >> >> >> >>>>config
>> >>> >> >> >> >> >>>> document to the <config-file> portion might be
>> >>>needed..
>> >>> >> >>Although
>> >>> >> >> >> >>Ive
>> >>> >> >> >> >> >>>>yet
>> >>> >> >> >> >> >>>> to dig up a use case. Will dig around more.
>> >>> >> >> >> >> >>>>
>> >>> >> >> >> >> >>>> Agreed - also things like target OS/SDK versions
>>may
>> >>>be
>> >>> >> >> >>required by
>> >>> >> >> >> >> >>>>certain plugins (i.e. this plugin uses an iOS 6 API,
>> >>>so we
>> >>> >> >>need
>> >>> >> >> >>to
>> >>> >> >> >> >> >>>>update your project to iOS 6). Probably the best
>> >>>approach
>> >>> >> >>there
>> >>> >> >> >>is
>> >>> >> >> >> >>to
>> >>> >> >> >> >> >>>>warn/prompt the user before proceeding.
>> >>> >> >> >> >> >>>>
>> >>> >> >> >> >> >>>> +1 agree that <resource-file> and <header-file> is
>> >>> >>redundant.
>> >>> >> >> >> >>Tooling
>> >>> >> >> >> >> >>>> should be able to distinguish this so merging with
>> >>> >> >><source-file>
>> >>> >> >> >> >> >>>>makes a
>> >>> >> >> >> >> >>>> lot of sense.
>> >>> >> >> >> >> >>>>
>> >>> >> >> >> >> >>>> Looking good!
>> >>> >> >> >> >> >>>>
>> >>> >> >> >> >> >>>> On 6/8/12 6:40 PM, "Andrew Lunny"
>> >>> >> >> >> >> >>>><al...@gmail.com>> wrote:
>> >>> >> >> >> >> >>>>
>> >>> >> >> >> >> >>>>>Hi all,
>> >>> >> >> >> >> >>>>>
>> >>> >> >> >> >> >>>>>I've posted to this list before about
>>pluginstall[1],
>> >>>the
>> >>> >> >>tool
>> >>> >> >> >>I've
>> >>> >> >> >> >> >>>>>developed as part of working on PhoneGap Build and
>> >>> >>requiring
>> >>> >> >> >> >> >>>>>programmatic
>> >>> >> >> >> >> >>>>>installation of Cordova plugins.
>> >>> >> >> >> >> >>>>>
>> >>> >> >> >> >> >>>>>I've now written up a spec for the format that
>> >>>pluginstall
>> >>> >> >>uses
>> >>> >> >> >>- I
>> >>> >> >> >> >> >>>>>think
>> >>> >> >> >> >> >>>>>it's generally useful for Cordova plugin
>>installation
>> >>>and
>> >>> >> >> >> >> >>>>>manipulation.
>> >>> >> >> >> >> >>>>>The
>> >>> >> >> >> >> >>>>>spec is available on GitHub:
>> >>> >> >> >> >> >>>>>https://github.com/alunny/cordova-plugin-spec
>> >>> >> >> >> >> >>>>>
>> >>> >> >> >> >> >>>>>Issues and/or pull requests and/or forks welcome.
>> >>> >> >> >> >> >>>>>
>> >>> >> >> >> >> >>>>>Cheers,
>> >>> >> >> >> >> >>>>>Andrew
>> >>> >> >> >> >> >>>>>
>> >>> >> >> >> >> >>>>>[1] https://github.com/alunny/pluginstall
>> >>> >> >> >> >> >>>>
>> >>> >> >> >> >> >>>>
>> >>> >> >> >> >> >>
>> >>> >> >> >> >>
>> >>> >> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> >>
>> >>> >>
>> >>>
>> >>>
>> >>
>> >>
>> >> --
>> >> @purplecabbage
>> >> risingj.com
>>
>>
>
>
>--
>@purplecabbage
>risingj.com


Re: Plugin Format and Spec

Posted by Jesse <pu...@gmail.com>.
0.6.8 ? Is your toaster unplugged Fil?
I am in windows and running without issue :
$ node -v => v0.6.18


On Mon, Jun 25, 2012 at 4:29 PM, Filip Maj <fi...@adobe.com> wrote:

> I wouldn¹t call that a blocker..
>
> Pluginstall works fine with node 0.6.8 too.
>
> I was using 0.6.6, some dependencies in pluginstall require at least node
> 0.6.7, so I upgraded to 0.6.8. Works fine.
>
> On 6/25/12 3:59 PM, "Shazron" <sh...@gmail.com> wrote:
>
> >pluginstall blocker:
> >https://github.com/alunny/node-xcode/issues/3
> >https://issues.apache.org/jira/browse/CB-631
> >
> >Only works with node 0.6.17
> >
> >
> >On Mon, Jun 25, 2012 at 2:09 PM, Jesse <pu...@gmail.com> wrote:
> >> We could use an 'engine' type specification similar to npm :
> >> "engine": "node >= 0.4.1"
> >>
> >>
> >>
> http://blog.nodejs.org/2012/02/27/managing-node-js-dependencies-with-shri
> >>nkwrap/
> >>
> >>
> >> On Mon, Jun 25, 2012 at 2:02 PM, Filip Maj <fi...@adobe.com> wrote:
> >>
> >>> Ideally, I would think we do NOT plan on doing that post-2.0. That
> >>>said,
> >>> our current deprecation policy, last I checked, was "6 months from
> >>>now",
> >>> which does not guarantee that the API will not change between minor
> >>> revisions.
> >>>
> >>> Thus, the conversation turns back to project versioning and
> >>>deprecation.
> >>>
> >>> Mike and I spoke about this this morning. I think both of us support
> >>>the
> >>> idea of moving to semantic versioning for 2.0 and beyond.
> >>>
> >>> On 6/25/12 1:45 PM, "Anis KADRI" <an...@gmail.com> wrote:
> >>>
> >>> >Agreed fil, but are we planning on doing that for future releases ?
> >>>If yes
> >>> >that YAH we should support versions and the solution you described is
> >>> >certainly an option. But if I were a plugin developer, I would not
> >>>want to
> >>> >update it every month to keep up with Cordova releases.
> >>> >I don't disagree that there could be an Cordova version in the
> >>>manifest
> >>> >file that allows plugin developers to target a specific version of
> >>>Cordova
> >>> >(which would mean that the plugin was tested with that version but
> >>>might
> >>> >also work with newer versions).
> >>> >
> >>> >On Mon, Jun 25, 2012 at 1:33 PM, Filip Maj <fi...@adobe.com> wrote:
> >>> >
> >>> >> Yes, it has changed every month. Pretty much every minor revision
> >>>from
> >>> >>1.0
> >>> >> to 1.9 has changed the API (at least on Android).
> >>> >>
> >>> >> On 6/25/12 1:26 PM, "Anis KADRI" <an...@gmail.com> wrote:
> >>> >>
> >>> >> >Right but does the plugin interface change every month too ? A
> >>>plugin
> >>> >>that
> >>> >> >works with Cordova 1.x.x is not supposed to work with Cordova
> >>>1.y.y ?
> >>> >> >
> >>> >> >On Mon, Jun 25, 2012 at 1:18 PM, Filip Maj <fi...@adobe.com> wrote:
> >>> >> >
> >>> >> >> You don't see any reason why plugins should support different
> >>> >>versions
> >>> >> >>of
> >>> >> >> cordova? Cordova gets released every month. This seems like a
> >>>pretty
> >>> >> >> important thing to figure out IMO
> >>> >> >>
> >>> >> >> On 6/25/12 1:12 PM, "Anis KADRI" <an...@gmail.com> wrote:
> >>> >> >>
> >>> >> >> >I think we should agree on a spec (plugin package and plugin
> >>> >>interface)
> >>> >> >> >and
> >>> >> >> >stick to it. As long as we don't break the plugin interface, I
> >>>don't
> >>> >> >>see
> >>> >> >> >any reason why plugins should support multiple versions of
> >>>Cordova.
> >>> >>If
> >>> >> >> >there are any, I'd love to hear them.
> >>> >> >> >
> >>> >> >> >On Mon, Jun 25, 2012 at 1:01 PM, Filip Maj <fi...@adobe.com>
> >>>wrote:
> >>> >> >> >
> >>> >> >> >> Back onto the versioning question..
> >>> >> >> >>
> >>> >> >> >> 1. Do we want to support different version of the cordova
> >>> >>framework
> >>> >> >>in
> >>> >> >> >> plugins, within a single repo, across versions that changed
> >>>the
> >>> >> >> >> native/javascript plugin API?
> >>> >> >> >> 2. How?
> >>> >> >> >>
> >>> >> >> >> If the answer to (1) is yes, one idea for (2) might be nesting
> >>> >> >>another
> >>> >> >> >> directory level in the all of the source directories that
> >>>contains
> >>> >> >>the
> >>> >> >> >> version number supported. For example:
> >>> >> >> >>
> >>> >> >> >> src/android/1.5.0/*.java
> >>> >> >> >> src/android/1.8.1/*.java
> >>> >> >> >> www/1.5.0/childbrowser.js
> >>> >> >> >> www/1.8.1/childbrowser.js
> >>> >> >> >>
> >>> >> >> >> Could get gnarly real quick though. Another, cleaner
> >>> >>implementation
> >>> >> >>in
> >>> >> >> >> terms of file system "noise" might be to employ a git branches
> >>> >> >> >> convention.. But that would enforce a git dependency.
> >>> >> >> >>
> >>> >> >> >> Just brainstorming / thinking out loud. Both are probably bad
> >>> >>ideas
> >>> >> >>:)
> >>> >> >> >>
> >>> >> >> >> On 6/25/12 11:41 AM, "Michael Brooks"
> >>><mi...@michaelbrooks.ca>
> >>> >> >>wrote:
> >>> >> >> >>
> >>> >> >> >> >We may also want to describe testing from JavaScript and
> >>>Native.
> >>> >> >> >> >
> >>> >> >> >> >I would also like to see a repository called
> >>> >> >>"cordova-plugin-template"
> >>> >> >> >> >that
> >>> >> >> >> >is a boilerplate to start writing any plugin. The idea is
> >>>that
> >>> >>users
> >>> >> >> >>start
> >>> >> >> >> >with something that works, with tests, and documentation
> >>> >> >>boilerplate -
> >>> >> >> >> >perhaps it can be an echo plugin since that has a minimal
> >>> >>footprint.
> >>> >> >> >> >
> >>> >> >> >> >On Mon, Jun 25, 2012 at 11:28 AM, Filip Maj <fi...@adobe.com>
> >>> >>wrote:
> >>> >> >> >> >
> >>> >> >> >> >> Looks great. I'll add some detail to the list you have
> >>>here.
> >>> >>I'd
> >>> >> >> >> >>recommend
> >>> >> >> >> >> tweaking the order a little bit; introducing the JS before
> >>>the
> >>> >> >>native
> >>> >> >> >> >>APIs.
> >>> >> >> >> >>
> >>> >> >> >> >> # Plugin Author Guide
> >>> >> >> >> >>
> >>> >> >> >> >> - plugin package format -> points to Andrew's plugin spec
> >>> >> >> >> >> - js api
> >>> >> >> >> >> --- basically documenting exec(). Service, action,
> >>>callbacks,
> >>> >> >> >>arguments.
> >>> >> >> >> >> What about how arguments are translated from JS types
> >>>(string,
> >>> >> >> >>number,
> >>> >> >> >> >> objects, etc) to native types for each platform?
> >>> >> >> >> >>
> >>> >> >> >> >> - native api
> >>> >> >> >> >> --- ios
> >>> >> >> >> >> --- android
> >>> >> >> >> >> --- blackberry
> >>> >> >> >> >> --- windowsphone
> >>> >> >> >> >> --- bada
> >>> >> >> >> >>
> >>> >> >> >> >>
> >>> >> >> >> >> On 6/25/12 11:16 AM, "Brian LeRoux" <b...@brian.io> wrote:
> >>> >> >> >> >>
> >>> >> >> >> >> >Biggest question is how to document. My thinking is that
> >>>we
> >>> >>want
> >>> >> >>to
> >>> >> >> >> >> >specify the PluginPackage so that PluginInstall works. So
> >>>the
> >>> >> >>docs
> >>> >> >> >> >> >would read like this:
> >>> >> >> >> >> >
> >>> >> >> >> >> ># Plugin Author Guide
> >>> >> >> >> >> >
> >>> >> >> >> >> >- plugin package format
> >>> >> >> >> >> >- native api
> >>> >> >> >> >> >--- ios
> >>> >> >> >> >> >--- android
> >>> >> >> >> >> >--- blackberry
> >>> >> >> >> >> >--- windowsphone
> >>> >> >> >> >> >--- bada
> >>> >> >> >> >> >- js api
> >>> >> >> >> >> >
> >>> >> >> >> >> >Thoughts? (If this looks good I will update the issue.)
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >On Mon, Jun 25, 2012 at 10:50 AM, Filip Maj
> >>><fi...@adobe.com>
> >>> >> >>wrote:
> >>> >> >> >> >> >> Hah Michael and I were just talking about that..
> >>> >> >> >> >> >>
> >>> >> >> >> >> >> I will send a pull request to Andrew's draft spec
> >>> >> >> >> >> >>
> >>> >> >> >> >> >> On 6/25/12 10:46 AM, "Brian LeRoux" <b...@brian.io> wrote:
> >>> >> >> >> >> >>
> >>> >> >> >> >> >>>npm does this w/ an 'engines' attribute on package.json
> >>> >> >> >> >> >>>
> >>> >> >> >> >> >>>On Mon, Jun 25, 2012 at 10:26 AM, Filip Maj
> >>><fi...@adobe.com>
> >>> >> >> wrote:
> >>> >> >> >> >> >>>> One more thing that came to mind is how to support
> >>> >>different
> >>> >> >> >> >>versions
> >>> >> >> >> >> >>>>of Cordova? Any ideas?
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>> From: Andrew Lunny
> >>> >> >><al...@gmail.com>>
> >>> >> >> >> >> >>>> Reply-To: "alunny@gmail.com<ma...@gmail.com>"
> >>> >> >> >> >> >>>><al...@gmail.com>>
> >>> >> >> >> >> >>>> To: Default User Nam
> >>><fil@adobe.com<mailto:fil@adobe.com
> >>> >>
> >>> >> >> >> >> >>>> Cc:
> >>> >> >> >> >> >>>>"callback-dev@incubator.apache.org<mailto:
> >>> >> >> >> >> callback-dev@incubator.apache
> >>> >> >> >> >> >>>>.o
> >>> >> >> >> >> >>>>rg>"
> >>> >> >> >> >> >>>><callback-dev@incubator.apache.org<mailto:
> >>> >> >> >> >> callback-dev@incubator.apache
> >>> >> >> >> >> >>>>.o
> >>> >> >> >> >> >>>>rg>>
> >>> >> >> >> >> >>>> Subject: Re: Plugin Format and Spec
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>> On 11 June 2012 13:50, Filip Maj
> >>> >> >> >> >><fil@adobe.com<mailto:fil@adobe.com
> >>> >> >> >> >> >>
> >>> >> >> >> >> >>>>wrote:
> >>> >> >> >> >> >>>> Nice work Andrew! I suggest taking this and moving to
> >>>a
> >>> >> >>cordova
> >>> >> >> >> >>wiki
> >>> >> >> >> >> >>>>page
> >>> >> >> >> >> >>>> (assuming all committers are on board to adopting
> >>>this as
> >>> >>the
> >>> >> >> >>basis
> >>> >> >> >> >> >>>>for
> >>> >> >> >> >> >>>>a
> >>> >> >> >> >> >>>> plugin spec)
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>> A link on the Cordova wiki is probably the best place
> >>>to
> >>> >> >>start
> >>> >> >> >>- we
> >>> >> >> >> >> >>>>can
> >>> >> >> >> >> >>>>get some more feedback from plugin authors and app
> >>> >>developers
> >>> >> >> >>(i.e.
> >>> >> >> >> >> >>>>keep
> >>> >> >> >> >> >>>>this as "a way to write plugins" rather than "the
> >>>official
> >>> >> >>way to
> >>> >> >> >> >>write
> >>> >> >> >> >> >>>>plugins").
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>> Is target-dir necessary for the <source-file>
> >>>element? For
> >>> >> >>Java
> >>> >> >> >> >>files,
> >>> >> >> >> >> >>>>the
> >>> >> >> >> >> >>>> tooling could take a peak inside the .java file and
> >>> >>extract
> >>> >> >>out
> >>> >> >> >>the
> >>> >> >> >> >> >>>> package name from the file, no? Phonegap build already
> >>> >>does
> >>> >> >>this
> >>> >> >> >> >> >>>>doesn't
> >>> >> >> >> >> >>>> it?
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>> PhoneGap Build did do this, but no longer supports
> >>> >>uploading
> >>> >> >> >> >>arbitrary
> >>> >> >> >> >> >>>>Java files. Only plugins with a manifest are supported.
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>> I'm torn - one of the goals of this format is to make
> >>>it
> >>> >>as
> >>> >> >> >>easy as
> >>> >> >> >> >> >>>>possible to write tools that use it as possible. Right
> >>> >>now, a
> >>> >> >> >>tool
> >>> >> >> >> >> >>>>reads
> >>> >> >> >> >> >>>>one file (plugin.xml) and moves source files (ignoring
> >>> >>config
> >>> >> >> >>files
> >>> >> >> >> >>for
> >>> >> >> >> >> >>>>the moment). I'd prefer it wasn't "read one file, then
> >>>read
> >>> >> >>each
> >>> >> >> >> >>.java
> >>> >> >> >> >> >>>>file to discover where to move it".
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>> One option is to use the id attribute on the top-level
> >>> >>plugin
> >>> >> >> >> >>element
> >>> >> >> >> >> >>>>to resolve the path, but that doesn't handle the case
> >>>where
> >>> >> >> >> >>different
> >>> >> >> >> >> >>>>Java files will have different paths. I wonder if
> >>>there are
> >>> >> >>more
> >>> >> >> >> >> >>>>complex
> >>> >> >> >> >> >>>>plugins around we can try to convert to see where the
> >>>pain
> >>> >> >>points
> >>> >> >> >> >>are.
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>> Adding the ability to modify existing parts of a
> >>>native
> >>> >> >> >>platform's
> >>> >> >> >> >> >>>>config
> >>> >> >> >> >> >>>> document to the <config-file> portion might be
> >>>needed..
> >>> >> >>Although
> >>> >> >> >> >>Ive
> >>> >> >> >> >> >>>>yet
> >>> >> >> >> >> >>>> to dig up a use case. Will dig around more.
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>> Agreed - also things like target OS/SDK versions may
> >>>be
> >>> >> >> >>required by
> >>> >> >> >> >> >>>>certain plugins (i.e. this plugin uses an iOS 6 API,
> >>>so we
> >>> >> >>need
> >>> >> >> >>to
> >>> >> >> >> >> >>>>update your project to iOS 6). Probably the best
> >>>approach
> >>> >> >>there
> >>> >> >> >>is
> >>> >> >> >> >>to
> >>> >> >> >> >> >>>>warn/prompt the user before proceeding.
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>> +1 agree that <resource-file> and <header-file> is
> >>> >>redundant.
> >>> >> >> >> >>Tooling
> >>> >> >> >> >> >>>> should be able to distinguish this so merging with
> >>> >> >><source-file>
> >>> >> >> >> >> >>>>makes a
> >>> >> >> >> >> >>>> lot of sense.
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>> Looking good!
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>> On 6/8/12 6:40 PM, "Andrew Lunny"
> >>> >> >> >> >> >>>><al...@gmail.com>> wrote:
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>>>Hi all,
> >>> >> >> >> >> >>>>>
> >>> >> >> >> >> >>>>>I've posted to this list before about pluginstall[1],
> >>>the
> >>> >> >>tool
> >>> >> >> >>I've
> >>> >> >> >> >> >>>>>developed as part of working on PhoneGap Build and
> >>> >>requiring
> >>> >> >> >> >> >>>>>programmatic
> >>> >> >> >> >> >>>>>installation of Cordova plugins.
> >>> >> >> >> >> >>>>>
> >>> >> >> >> >> >>>>>I've now written up a spec for the format that
> >>>pluginstall
> >>> >> >>uses
> >>> >> >> >>- I
> >>> >> >> >> >> >>>>>think
> >>> >> >> >> >> >>>>>it's generally useful for Cordova plugin installation
> >>>and
> >>> >> >> >> >> >>>>>manipulation.
> >>> >> >> >> >> >>>>>The
> >>> >> >> >> >> >>>>>spec is available on GitHub:
> >>> >> >> >> >> >>>>>https://github.com/alunny/cordova-plugin-spec
> >>> >> >> >> >> >>>>>
> >>> >> >> >> >> >>>>>Issues and/or pull requests and/or forks welcome.
> >>> >> >> >> >> >>>>>
> >>> >> >> >> >> >>>>>Cheers,
> >>> >> >> >> >> >>>>>Andrew
> >>> >> >> >> >> >>>>>
> >>> >> >> >> >> >>>>>[1] https://github.com/alunny/pluginstall
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>
> >>> >> >> >> >>
> >>> >> >> >> >>
> >>> >> >> >>
> >>> >> >> >>
> >>> >> >>
> >>> >> >>
> >>> >>
> >>> >>
> >>>
> >>>
> >>
> >>
> >> --
> >> @purplecabbage
> >> risingj.com
>
>


-- 
@purplecabbage
risingj.com

Re: Plugin Format and Spec

Posted by Anis KADRI <an...@gmail.com>.
I would call that an "annoyer".

if you download nodejs right now, it doens't work.

On Mon, Jun 25, 2012 at 4:29 PM, Filip Maj <fi...@adobe.com> wrote:

> I wouldn¹t call that a blocker..
>
> Pluginstall works fine with node 0.6.8 too.
>
> I was using 0.6.6, some dependencies in pluginstall require at least node
> 0.6.7, so I upgraded to 0.6.8. Works fine.
>
> On 6/25/12 3:59 PM, "Shazron" <sh...@gmail.com> wrote:
>
> >pluginstall blocker:
> >https://github.com/alunny/node-xcode/issues/3
> >https://issues.apache.org/jira/browse/CB-631
> >
> >Only works with node 0.6.17
> >
> >
> >On Mon, Jun 25, 2012 at 2:09 PM, Jesse <pu...@gmail.com> wrote:
> >> We could use an 'engine' type specification similar to npm :
> >> "engine": "node >= 0.4.1"
> >>
> >>
> >>
> http://blog.nodejs.org/2012/02/27/managing-node-js-dependencies-with-shri
> >>nkwrap/
> >>
> >>
> >> On Mon, Jun 25, 2012 at 2:02 PM, Filip Maj <fi...@adobe.com> wrote:
> >>
> >>> Ideally, I would think we do NOT plan on doing that post-2.0. That
> >>>said,
> >>> our current deprecation policy, last I checked, was "6 months from
> >>>now",
> >>> which does not guarantee that the API will not change between minor
> >>> revisions.
> >>>
> >>> Thus, the conversation turns back to project versioning and
> >>>deprecation.
> >>>
> >>> Mike and I spoke about this this morning. I think both of us support
> >>>the
> >>> idea of moving to semantic versioning for 2.0 and beyond.
> >>>
> >>> On 6/25/12 1:45 PM, "Anis KADRI" <an...@gmail.com> wrote:
> >>>
> >>> >Agreed fil, but are we planning on doing that for future releases ?
> >>>If yes
> >>> >that YAH we should support versions and the solution you described is
> >>> >certainly an option. But if I were a plugin developer, I would not
> >>>want to
> >>> >update it every month to keep up with Cordova releases.
> >>> >I don't disagree that there could be an Cordova version in the
> >>>manifest
> >>> >file that allows plugin developers to target a specific version of
> >>>Cordova
> >>> >(which would mean that the plugin was tested with that version but
> >>>might
> >>> >also work with newer versions).
> >>> >
> >>> >On Mon, Jun 25, 2012 at 1:33 PM, Filip Maj <fi...@adobe.com> wrote:
> >>> >
> >>> >> Yes, it has changed every month. Pretty much every minor revision
> >>>from
> >>> >>1.0
> >>> >> to 1.9 has changed the API (at least on Android).
> >>> >>
> >>> >> On 6/25/12 1:26 PM, "Anis KADRI" <an...@gmail.com> wrote:
> >>> >>
> >>> >> >Right but does the plugin interface change every month too ? A
> >>>plugin
> >>> >>that
> >>> >> >works with Cordova 1.x.x is not supposed to work with Cordova
> >>>1.y.y ?
> >>> >> >
> >>> >> >On Mon, Jun 25, 2012 at 1:18 PM, Filip Maj <fi...@adobe.com> wrote:
> >>> >> >
> >>> >> >> You don't see any reason why plugins should support different
> >>> >>versions
> >>> >> >>of
> >>> >> >> cordova? Cordova gets released every month. This seems like a
> >>>pretty
> >>> >> >> important thing to figure out IMO
> >>> >> >>
> >>> >> >> On 6/25/12 1:12 PM, "Anis KADRI" <an...@gmail.com> wrote:
> >>> >> >>
> >>> >> >> >I think we should agree on a spec (plugin package and plugin
> >>> >>interface)
> >>> >> >> >and
> >>> >> >> >stick to it. As long as we don't break the plugin interface, I
> >>>don't
> >>> >> >>see
> >>> >> >> >any reason why plugins should support multiple versions of
> >>>Cordova.
> >>> >>If
> >>> >> >> >there are any, I'd love to hear them.
> >>> >> >> >
> >>> >> >> >On Mon, Jun 25, 2012 at 1:01 PM, Filip Maj <fi...@adobe.com>
> >>>wrote:
> >>> >> >> >
> >>> >> >> >> Back onto the versioning question..
> >>> >> >> >>
> >>> >> >> >> 1. Do we want to support different version of the cordova
> >>> >>framework
> >>> >> >>in
> >>> >> >> >> plugins, within a single repo, across versions that changed
> >>>the
> >>> >> >> >> native/javascript plugin API?
> >>> >> >> >> 2. How?
> >>> >> >> >>
> >>> >> >> >> If the answer to (1) is yes, one idea for (2) might be nesting
> >>> >> >>another
> >>> >> >> >> directory level in the all of the source directories that
> >>>contains
> >>> >> >>the
> >>> >> >> >> version number supported. For example:
> >>> >> >> >>
> >>> >> >> >> src/android/1.5.0/*.java
> >>> >> >> >> src/android/1.8.1/*.java
> >>> >> >> >> www/1.5.0/childbrowser.js
> >>> >> >> >> www/1.8.1/childbrowser.js
> >>> >> >> >>
> >>> >> >> >> Could get gnarly real quick though. Another, cleaner
> >>> >>implementation
> >>> >> >>in
> >>> >> >> >> terms of file system "noise" might be to employ a git branches
> >>> >> >> >> convention.. But that would enforce a git dependency.
> >>> >> >> >>
> >>> >> >> >> Just brainstorming / thinking out loud. Both are probably bad
> >>> >>ideas
> >>> >> >>:)
> >>> >> >> >>
> >>> >> >> >> On 6/25/12 11:41 AM, "Michael Brooks"
> >>><mi...@michaelbrooks.ca>
> >>> >> >>wrote:
> >>> >> >> >>
> >>> >> >> >> >We may also want to describe testing from JavaScript and
> >>>Native.
> >>> >> >> >> >
> >>> >> >> >> >I would also like to see a repository called
> >>> >> >>"cordova-plugin-template"
> >>> >> >> >> >that
> >>> >> >> >> >is a boilerplate to start writing any plugin. The idea is
> >>>that
> >>> >>users
> >>> >> >> >>start
> >>> >> >> >> >with something that works, with tests, and documentation
> >>> >> >>boilerplate -
> >>> >> >> >> >perhaps it can be an echo plugin since that has a minimal
> >>> >>footprint.
> >>> >> >> >> >
> >>> >> >> >> >On Mon, Jun 25, 2012 at 11:28 AM, Filip Maj <fi...@adobe.com>
> >>> >>wrote:
> >>> >> >> >> >
> >>> >> >> >> >> Looks great. I'll add some detail to the list you have
> >>>here.
> >>> >>I'd
> >>> >> >> >> >>recommend
> >>> >> >> >> >> tweaking the order a little bit; introducing the JS before
> >>>the
> >>> >> >>native
> >>> >> >> >> >>APIs.
> >>> >> >> >> >>
> >>> >> >> >> >> # Plugin Author Guide
> >>> >> >> >> >>
> >>> >> >> >> >> - plugin package format -> points to Andrew's plugin spec
> >>> >> >> >> >> - js api
> >>> >> >> >> >> --- basically documenting exec(). Service, action,
> >>>callbacks,
> >>> >> >> >>arguments.
> >>> >> >> >> >> What about how arguments are translated from JS types
> >>>(string,
> >>> >> >> >>number,
> >>> >> >> >> >> objects, etc) to native types for each platform?
> >>> >> >> >> >>
> >>> >> >> >> >> - native api
> >>> >> >> >> >> --- ios
> >>> >> >> >> >> --- android
> >>> >> >> >> >> --- blackberry
> >>> >> >> >> >> --- windowsphone
> >>> >> >> >> >> --- bada
> >>> >> >> >> >>
> >>> >> >> >> >>
> >>> >> >> >> >> On 6/25/12 11:16 AM, "Brian LeRoux" <b...@brian.io> wrote:
> >>> >> >> >> >>
> >>> >> >> >> >> >Biggest question is how to document. My thinking is that
> >>>we
> >>> >>want
> >>> >> >>to
> >>> >> >> >> >> >specify the PluginPackage so that PluginInstall works. So
> >>>the
> >>> >> >>docs
> >>> >> >> >> >> >would read like this:
> >>> >> >> >> >> >
> >>> >> >> >> >> ># Plugin Author Guide
> >>> >> >> >> >> >
> >>> >> >> >> >> >- plugin package format
> >>> >> >> >> >> >- native api
> >>> >> >> >> >> >--- ios
> >>> >> >> >> >> >--- android
> >>> >> >> >> >> >--- blackberry
> >>> >> >> >> >> >--- windowsphone
> >>> >> >> >> >> >--- bada
> >>> >> >> >> >> >- js api
> >>> >> >> >> >> >
> >>> >> >> >> >> >Thoughts? (If this looks good I will update the issue.)
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >On Mon, Jun 25, 2012 at 10:50 AM, Filip Maj
> >>><fi...@adobe.com>
> >>> >> >>wrote:
> >>> >> >> >> >> >> Hah Michael and I were just talking about that..
> >>> >> >> >> >> >>
> >>> >> >> >> >> >> I will send a pull request to Andrew's draft spec
> >>> >> >> >> >> >>
> >>> >> >> >> >> >> On 6/25/12 10:46 AM, "Brian LeRoux" <b...@brian.io> wrote:
> >>> >> >> >> >> >>
> >>> >> >> >> >> >>>npm does this w/ an 'engines' attribute on package.json
> >>> >> >> >> >> >>>
> >>> >> >> >> >> >>>On Mon, Jun 25, 2012 at 10:26 AM, Filip Maj
> >>><fi...@adobe.com>
> >>> >> >> wrote:
> >>> >> >> >> >> >>>> One more thing that came to mind is how to support
> >>> >>different
> >>> >> >> >> >>versions
> >>> >> >> >> >> >>>>of Cordova? Any ideas?
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>> From: Andrew Lunny
> >>> >> >><al...@gmail.com>>
> >>> >> >> >> >> >>>> Reply-To: "alunny@gmail.com<ma...@gmail.com>"
> >>> >> >> >> >> >>>><al...@gmail.com>>
> >>> >> >> >> >> >>>> To: Default User Nam
> >>><fil@adobe.com<mailto:fil@adobe.com
> >>> >>
> >>> >> >> >> >> >>>> Cc:
> >>> >> >> >> >> >>>>"callback-dev@incubator.apache.org<mailto:
> >>> >> >> >> >> callback-dev@incubator.apache
> >>> >> >> >> >> >>>>.o
> >>> >> >> >> >> >>>>rg>"
> >>> >> >> >> >> >>>><callback-dev@incubator.apache.org<mailto:
> >>> >> >> >> >> callback-dev@incubator.apache
> >>> >> >> >> >> >>>>.o
> >>> >> >> >> >> >>>>rg>>
> >>> >> >> >> >> >>>> Subject: Re: Plugin Format and Spec
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>> On 11 June 2012 13:50, Filip Maj
> >>> >> >> >> >><fil@adobe.com<mailto:fil@adobe.com
> >>> >> >> >> >> >>
> >>> >> >> >> >> >>>>wrote:
> >>> >> >> >> >> >>>> Nice work Andrew! I suggest taking this and moving to
> >>>a
> >>> >> >>cordova
> >>> >> >> >> >>wiki
> >>> >> >> >> >> >>>>page
> >>> >> >> >> >> >>>> (assuming all committers are on board to adopting
> >>>this as
> >>> >>the
> >>> >> >> >>basis
> >>> >> >> >> >> >>>>for
> >>> >> >> >> >> >>>>a
> >>> >> >> >> >> >>>> plugin spec)
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>> A link on the Cordova wiki is probably the best place
> >>>to
> >>> >> >>start
> >>> >> >> >>- we
> >>> >> >> >> >> >>>>can
> >>> >> >> >> >> >>>>get some more feedback from plugin authors and app
> >>> >>developers
> >>> >> >> >>(i.e.
> >>> >> >> >> >> >>>>keep
> >>> >> >> >> >> >>>>this as "a way to write plugins" rather than "the
> >>>official
> >>> >> >>way to
> >>> >> >> >> >>write
> >>> >> >> >> >> >>>>plugins").
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>> Is target-dir necessary for the <source-file>
> >>>element? For
> >>> >> >>Java
> >>> >> >> >> >>files,
> >>> >> >> >> >> >>>>the
> >>> >> >> >> >> >>>> tooling could take a peak inside the .java file and
> >>> >>extract
> >>> >> >>out
> >>> >> >> >>the
> >>> >> >> >> >> >>>> package name from the file, no? Phonegap build already
> >>> >>does
> >>> >> >>this
> >>> >> >> >> >> >>>>doesn't
> >>> >> >> >> >> >>>> it?
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>> PhoneGap Build did do this, but no longer supports
> >>> >>uploading
> >>> >> >> >> >>arbitrary
> >>> >> >> >> >> >>>>Java files. Only plugins with a manifest are supported.
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>> I'm torn - one of the goals of this format is to make
> >>>it
> >>> >>as
> >>> >> >> >>easy as
> >>> >> >> >> >> >>>>possible to write tools that use it as possible. Right
> >>> >>now, a
> >>> >> >> >>tool
> >>> >> >> >> >> >>>>reads
> >>> >> >> >> >> >>>>one file (plugin.xml) and moves source files (ignoring
> >>> >>config
> >>> >> >> >>files
> >>> >> >> >> >>for
> >>> >> >> >> >> >>>>the moment). I'd prefer it wasn't "read one file, then
> >>>read
> >>> >> >>each
> >>> >> >> >> >>.java
> >>> >> >> >> >> >>>>file to discover where to move it".
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>> One option is to use the id attribute on the top-level
> >>> >>plugin
> >>> >> >> >> >>element
> >>> >> >> >> >> >>>>to resolve the path, but that doesn't handle the case
> >>>where
> >>> >> >> >> >>different
> >>> >> >> >> >> >>>>Java files will have different paths. I wonder if
> >>>there are
> >>> >> >>more
> >>> >> >> >> >> >>>>complex
> >>> >> >> >> >> >>>>plugins around we can try to convert to see where the
> >>>pain
> >>> >> >>points
> >>> >> >> >> >>are.
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>> Adding the ability to modify existing parts of a
> >>>native
> >>> >> >> >>platform's
> >>> >> >> >> >> >>>>config
> >>> >> >> >> >> >>>> document to the <config-file> portion might be
> >>>needed..
> >>> >> >>Although
> >>> >> >> >> >>Ive
> >>> >> >> >> >> >>>>yet
> >>> >> >> >> >> >>>> to dig up a use case. Will dig around more.
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>> Agreed - also things like target OS/SDK versions may
> >>>be
> >>> >> >> >>required by
> >>> >> >> >> >> >>>>certain plugins (i.e. this plugin uses an iOS 6 API,
> >>>so we
> >>> >> >>need
> >>> >> >> >>to
> >>> >> >> >> >> >>>>update your project to iOS 6). Probably the best
> >>>approach
> >>> >> >>there
> >>> >> >> >>is
> >>> >> >> >> >>to
> >>> >> >> >> >> >>>>warn/prompt the user before proceeding.
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>> +1 agree that <resource-file> and <header-file> is
> >>> >>redundant.
> >>> >> >> >> >>Tooling
> >>> >> >> >> >> >>>> should be able to distinguish this so merging with
> >>> >> >><source-file>
> >>> >> >> >> >> >>>>makes a
> >>> >> >> >> >> >>>> lot of sense.
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>> Looking good!
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>> On 6/8/12 6:40 PM, "Andrew Lunny"
> >>> >> >> >> >> >>>><al...@gmail.com>> wrote:
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>>>Hi all,
> >>> >> >> >> >> >>>>>
> >>> >> >> >> >> >>>>>I've posted to this list before about pluginstall[1],
> >>>the
> >>> >> >>tool
> >>> >> >> >>I've
> >>> >> >> >> >> >>>>>developed as part of working on PhoneGap Build and
> >>> >>requiring
> >>> >> >> >> >> >>>>>programmatic
> >>> >> >> >> >> >>>>>installation of Cordova plugins.
> >>> >> >> >> >> >>>>>
> >>> >> >> >> >> >>>>>I've now written up a spec for the format that
> >>>pluginstall
> >>> >> >>uses
> >>> >> >> >>- I
> >>> >> >> >> >> >>>>>think
> >>> >> >> >> >> >>>>>it's generally useful for Cordova plugin installation
> >>>and
> >>> >> >> >> >> >>>>>manipulation.
> >>> >> >> >> >> >>>>>The
> >>> >> >> >> >> >>>>>spec is available on GitHub:
> >>> >> >> >> >> >>>>>https://github.com/alunny/cordova-plugin-spec
> >>> >> >> >> >> >>>>>
> >>> >> >> >> >> >>>>>Issues and/or pull requests and/or forks welcome.
> >>> >> >> >> >> >>>>>
> >>> >> >> >> >> >>>>>Cheers,
> >>> >> >> >> >> >>>>>Andrew
> >>> >> >> >> >> >>>>>
> >>> >> >> >> >> >>>>>[1] https://github.com/alunny/pluginstall
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>>>
> >>> >> >> >> >> >>
> >>> >> >> >> >>
> >>> >> >> >> >>
> >>> >> >> >>
> >>> >> >> >>
> >>> >> >>
> >>> >> >>
> >>> >>
> >>> >>
> >>>
> >>>
> >>
> >>
> >> --
> >> @purplecabbage
> >> risingj.com
>
>

Re: Plugin Format and Spec

Posted by Filip Maj <fi...@adobe.com>.
I wouldn¹t call that a blocker..

Pluginstall works fine with node 0.6.8 too.

I was using 0.6.6, some dependencies in pluginstall require at least node
0.6.7, so I upgraded to 0.6.8. Works fine.

On 6/25/12 3:59 PM, "Shazron" <sh...@gmail.com> wrote:

>pluginstall blocker:
>https://github.com/alunny/node-xcode/issues/3
>https://issues.apache.org/jira/browse/CB-631
>
>Only works with node 0.6.17
>
>
>On Mon, Jun 25, 2012 at 2:09 PM, Jesse <pu...@gmail.com> wrote:
>> We could use an 'engine' type specification similar to npm :
>> "engine": "node >= 0.4.1"
>>
>> 
>>http://blog.nodejs.org/2012/02/27/managing-node-js-dependencies-with-shri
>>nkwrap/
>>
>>
>> On Mon, Jun 25, 2012 at 2:02 PM, Filip Maj <fi...@adobe.com> wrote:
>>
>>> Ideally, I would think we do NOT plan on doing that post-2.0. That
>>>said,
>>> our current deprecation policy, last I checked, was "6 months from
>>>now",
>>> which does not guarantee that the API will not change between minor
>>> revisions.
>>>
>>> Thus, the conversation turns back to project versioning and
>>>deprecation.
>>>
>>> Mike and I spoke about this this morning. I think both of us support
>>>the
>>> idea of moving to semantic versioning for 2.0 and beyond.
>>>
>>> On 6/25/12 1:45 PM, "Anis KADRI" <an...@gmail.com> wrote:
>>>
>>> >Agreed fil, but are we planning on doing that for future releases ?
>>>If yes
>>> >that YAH we should support versions and the solution you described is
>>> >certainly an option. But if I were a plugin developer, I would not
>>>want to
>>> >update it every month to keep up with Cordova releases.
>>> >I don't disagree that there could be an Cordova version in the
>>>manifest
>>> >file that allows plugin developers to target a specific version of
>>>Cordova
>>> >(which would mean that the plugin was tested with that version but
>>>might
>>> >also work with newer versions).
>>> >
>>> >On Mon, Jun 25, 2012 at 1:33 PM, Filip Maj <fi...@adobe.com> wrote:
>>> >
>>> >> Yes, it has changed every month. Pretty much every minor revision
>>>from
>>> >>1.0
>>> >> to 1.9 has changed the API (at least on Android).
>>> >>
>>> >> On 6/25/12 1:26 PM, "Anis KADRI" <an...@gmail.com> wrote:
>>> >>
>>> >> >Right but does the plugin interface change every month too ? A
>>>plugin
>>> >>that
>>> >> >works with Cordova 1.x.x is not supposed to work with Cordova
>>>1.y.y ?
>>> >> >
>>> >> >On Mon, Jun 25, 2012 at 1:18 PM, Filip Maj <fi...@adobe.com> wrote:
>>> >> >
>>> >> >> You don't see any reason why plugins should support different
>>> >>versions
>>> >> >>of
>>> >> >> cordova? Cordova gets released every month. This seems like a
>>>pretty
>>> >> >> important thing to figure out IMO
>>> >> >>
>>> >> >> On 6/25/12 1:12 PM, "Anis KADRI" <an...@gmail.com> wrote:
>>> >> >>
>>> >> >> >I think we should agree on a spec (plugin package and plugin
>>> >>interface)
>>> >> >> >and
>>> >> >> >stick to it. As long as we don't break the plugin interface, I
>>>don't
>>> >> >>see
>>> >> >> >any reason why plugins should support multiple versions of
>>>Cordova.
>>> >>If
>>> >> >> >there are any, I'd love to hear them.
>>> >> >> >
>>> >> >> >On Mon, Jun 25, 2012 at 1:01 PM, Filip Maj <fi...@adobe.com>
>>>wrote:
>>> >> >> >
>>> >> >> >> Back onto the versioning question..
>>> >> >> >>
>>> >> >> >> 1. Do we want to support different version of the cordova
>>> >>framework
>>> >> >>in
>>> >> >> >> plugins, within a single repo, across versions that changed
>>>the
>>> >> >> >> native/javascript plugin API?
>>> >> >> >> 2. How?
>>> >> >> >>
>>> >> >> >> If the answer to (1) is yes, one idea for (2) might be nesting
>>> >> >>another
>>> >> >> >> directory level in the all of the source directories that
>>>contains
>>> >> >>the
>>> >> >> >> version number supported. For example:
>>> >> >> >>
>>> >> >> >> src/android/1.5.0/*.java
>>> >> >> >> src/android/1.8.1/*.java
>>> >> >> >> www/1.5.0/childbrowser.js
>>> >> >> >> www/1.8.1/childbrowser.js
>>> >> >> >>
>>> >> >> >> Could get gnarly real quick though. Another, cleaner
>>> >>implementation
>>> >> >>in
>>> >> >> >> terms of file system "noise" might be to employ a git branches
>>> >> >> >> convention.. But that would enforce a git dependency.
>>> >> >> >>
>>> >> >> >> Just brainstorming / thinking out loud. Both are probably bad
>>> >>ideas
>>> >> >>:)
>>> >> >> >>
>>> >> >> >> On 6/25/12 11:41 AM, "Michael Brooks"
>>><mi...@michaelbrooks.ca>
>>> >> >>wrote:
>>> >> >> >>
>>> >> >> >> >We may also want to describe testing from JavaScript and
>>>Native.
>>> >> >> >> >
>>> >> >> >> >I would also like to see a repository called
>>> >> >>"cordova-plugin-template"
>>> >> >> >> >that
>>> >> >> >> >is a boilerplate to start writing any plugin. The idea is
>>>that
>>> >>users
>>> >> >> >>start
>>> >> >> >> >with something that works, with tests, and documentation
>>> >> >>boilerplate -
>>> >> >> >> >perhaps it can be an echo plugin since that has a minimal
>>> >>footprint.
>>> >> >> >> >
>>> >> >> >> >On Mon, Jun 25, 2012 at 11:28 AM, Filip Maj <fi...@adobe.com>
>>> >>wrote:
>>> >> >> >> >
>>> >> >> >> >> Looks great. I'll add some detail to the list you have
>>>here.
>>> >>I'd
>>> >> >> >> >>recommend
>>> >> >> >> >> tweaking the order a little bit; introducing the JS before
>>>the
>>> >> >>native
>>> >> >> >> >>APIs.
>>> >> >> >> >>
>>> >> >> >> >> # Plugin Author Guide
>>> >> >> >> >>
>>> >> >> >> >> - plugin package format -> points to Andrew's plugin spec
>>> >> >> >> >> - js api
>>> >> >> >> >> --- basically documenting exec(). Service, action,
>>>callbacks,
>>> >> >> >>arguments.
>>> >> >> >> >> What about how arguments are translated from JS types
>>>(string,
>>> >> >> >>number,
>>> >> >> >> >> objects, etc) to native types for each platform?
>>> >> >> >> >>
>>> >> >> >> >> - native api
>>> >> >> >> >> --- ios
>>> >> >> >> >> --- android
>>> >> >> >> >> --- blackberry
>>> >> >> >> >> --- windowsphone
>>> >> >> >> >> --- bada
>>> >> >> >> >>
>>> >> >> >> >>
>>> >> >> >> >> On 6/25/12 11:16 AM, "Brian LeRoux" <b...@brian.io> wrote:
>>> >> >> >> >>
>>> >> >> >> >> >Biggest question is how to document. My thinking is that
>>>we
>>> >>want
>>> >> >>to
>>> >> >> >> >> >specify the PluginPackage so that PluginInstall works. So
>>>the
>>> >> >>docs
>>> >> >> >> >> >would read like this:
>>> >> >> >> >> >
>>> >> >> >> >> ># Plugin Author Guide
>>> >> >> >> >> >
>>> >> >> >> >> >- plugin package format
>>> >> >> >> >> >- native api
>>> >> >> >> >> >--- ios
>>> >> >> >> >> >--- android
>>> >> >> >> >> >--- blackberry
>>> >> >> >> >> >--- windowsphone
>>> >> >> >> >> >--- bada
>>> >> >> >> >> >- js api
>>> >> >> >> >> >
>>> >> >> >> >> >Thoughts? (If this looks good I will update the issue.)
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >On Mon, Jun 25, 2012 at 10:50 AM, Filip Maj
>>><fi...@adobe.com>
>>> >> >>wrote:
>>> >> >> >> >> >> Hah Michael and I were just talking about that..
>>> >> >> >> >> >>
>>> >> >> >> >> >> I will send a pull request to Andrew's draft spec
>>> >> >> >> >> >>
>>> >> >> >> >> >> On 6/25/12 10:46 AM, "Brian LeRoux" <b...@brian.io> wrote:
>>> >> >> >> >> >>
>>> >> >> >> >> >>>npm does this w/ an 'engines' attribute on package.json
>>> >> >> >> >> >>>
>>> >> >> >> >> >>>On Mon, Jun 25, 2012 at 10:26 AM, Filip Maj
>>><fi...@adobe.com>
>>> >> >> wrote:
>>> >> >> >> >> >>>> One more thing that came to mind is how to support
>>> >>different
>>> >> >> >> >>versions
>>> >> >> >> >> >>>>of Cordova? Any ideas?
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>> From: Andrew Lunny
>>> >> >><al...@gmail.com>>
>>> >> >> >> >> >>>> Reply-To: "alunny@gmail.com<ma...@gmail.com>"
>>> >> >> >> >> >>>><al...@gmail.com>>
>>> >> >> >> >> >>>> To: Default User Nam
>>><fil@adobe.com<mailto:fil@adobe.com
>>> >>
>>> >> >> >> >> >>>> Cc:
>>> >> >> >> >> >>>>"callback-dev@incubator.apache.org<mailto:
>>> >> >> >> >> callback-dev@incubator.apache
>>> >> >> >> >> >>>>.o
>>> >> >> >> >> >>>>rg>"
>>> >> >> >> >> >>>><callback-dev@incubator.apache.org<mailto:
>>> >> >> >> >> callback-dev@incubator.apache
>>> >> >> >> >> >>>>.o
>>> >> >> >> >> >>>>rg>>
>>> >> >> >> >> >>>> Subject: Re: Plugin Format and Spec
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>> On 11 June 2012 13:50, Filip Maj
>>> >> >> >> >><fil@adobe.com<mailto:fil@adobe.com
>>> >> >> >> >> >>
>>> >> >> >> >> >>>>wrote:
>>> >> >> >> >> >>>> Nice work Andrew! I suggest taking this and moving to
>>>a
>>> >> >>cordova
>>> >> >> >> >>wiki
>>> >> >> >> >> >>>>page
>>> >> >> >> >> >>>> (assuming all committers are on board to adopting
>>>this as
>>> >>the
>>> >> >> >>basis
>>> >> >> >> >> >>>>for
>>> >> >> >> >> >>>>a
>>> >> >> >> >> >>>> plugin spec)
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>> A link on the Cordova wiki is probably the best place
>>>to
>>> >> >>start
>>> >> >> >>- we
>>> >> >> >> >> >>>>can
>>> >> >> >> >> >>>>get some more feedback from plugin authors and app
>>> >>developers
>>> >> >> >>(i.e.
>>> >> >> >> >> >>>>keep
>>> >> >> >> >> >>>>this as "a way to write plugins" rather than "the
>>>official
>>> >> >>way to
>>> >> >> >> >>write
>>> >> >> >> >> >>>>plugins").
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>> Is target-dir necessary for the <source-file>
>>>element? For
>>> >> >>Java
>>> >> >> >> >>files,
>>> >> >> >> >> >>>>the
>>> >> >> >> >> >>>> tooling could take a peak inside the .java file and
>>> >>extract
>>> >> >>out
>>> >> >> >>the
>>> >> >> >> >> >>>> package name from the file, no? Phonegap build already
>>> >>does
>>> >> >>this
>>> >> >> >> >> >>>>doesn't
>>> >> >> >> >> >>>> it?
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>> PhoneGap Build did do this, but no longer supports
>>> >>uploading
>>> >> >> >> >>arbitrary
>>> >> >> >> >> >>>>Java files. Only plugins with a manifest are supported.
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>> I'm torn - one of the goals of this format is to make
>>>it
>>> >>as
>>> >> >> >>easy as
>>> >> >> >> >> >>>>possible to write tools that use it as possible. Right
>>> >>now, a
>>> >> >> >>tool
>>> >> >> >> >> >>>>reads
>>> >> >> >> >> >>>>one file (plugin.xml) and moves source files (ignoring
>>> >>config
>>> >> >> >>files
>>> >> >> >> >>for
>>> >> >> >> >> >>>>the moment). I'd prefer it wasn't "read one file, then
>>>read
>>> >> >>each
>>> >> >> >> >>.java
>>> >> >> >> >> >>>>file to discover where to move it".
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>> One option is to use the id attribute on the top-level
>>> >>plugin
>>> >> >> >> >>element
>>> >> >> >> >> >>>>to resolve the path, but that doesn't handle the case
>>>where
>>> >> >> >> >>different
>>> >> >> >> >> >>>>Java files will have different paths. I wonder if
>>>there are
>>> >> >>more
>>> >> >> >> >> >>>>complex
>>> >> >> >> >> >>>>plugins around we can try to convert to see where the
>>>pain
>>> >> >>points
>>> >> >> >> >>are.
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>> Adding the ability to modify existing parts of a
>>>native
>>> >> >> >>platform's
>>> >> >> >> >> >>>>config
>>> >> >> >> >> >>>> document to the <config-file> portion might be
>>>needed..
>>> >> >>Although
>>> >> >> >> >>Ive
>>> >> >> >> >> >>>>yet
>>> >> >> >> >> >>>> to dig up a use case. Will dig around more.
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>> Agreed - also things like target OS/SDK versions may
>>>be
>>> >> >> >>required by
>>> >> >> >> >> >>>>certain plugins (i.e. this plugin uses an iOS 6 API,
>>>so we
>>> >> >>need
>>> >> >> >>to
>>> >> >> >> >> >>>>update your project to iOS 6). Probably the best
>>>approach
>>> >> >>there
>>> >> >> >>is
>>> >> >> >> >>to
>>> >> >> >> >> >>>>warn/prompt the user before proceeding.
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>> +1 agree that <resource-file> and <header-file> is
>>> >>redundant.
>>> >> >> >> >>Tooling
>>> >> >> >> >> >>>> should be able to distinguish this so merging with
>>> >> >><source-file>
>>> >> >> >> >> >>>>makes a
>>> >> >> >> >> >>>> lot of sense.
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>> Looking good!
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>> On 6/8/12 6:40 PM, "Andrew Lunny"
>>> >> >> >> >> >>>><al...@gmail.com>> wrote:
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>>>Hi all,
>>> >> >> >> >> >>>>>
>>> >> >> >> >> >>>>>I've posted to this list before about pluginstall[1],
>>>the
>>> >> >>tool
>>> >> >> >>I've
>>> >> >> >> >> >>>>>developed as part of working on PhoneGap Build and
>>> >>requiring
>>> >> >> >> >> >>>>>programmatic
>>> >> >> >> >> >>>>>installation of Cordova plugins.
>>> >> >> >> >> >>>>>
>>> >> >> >> >> >>>>>I've now written up a spec for the format that
>>>pluginstall
>>> >> >>uses
>>> >> >> >>- I
>>> >> >> >> >> >>>>>think
>>> >> >> >> >> >>>>>it's generally useful for Cordova plugin installation
>>>and
>>> >> >> >> >> >>>>>manipulation.
>>> >> >> >> >> >>>>>The
>>> >> >> >> >> >>>>>spec is available on GitHub:
>>> >> >> >> >> >>>>>https://github.com/alunny/cordova-plugin-spec
>>> >> >> >> >> >>>>>
>>> >> >> >> >> >>>>>Issues and/or pull requests and/or forks welcome.
>>> >> >> >> >> >>>>>
>>> >> >> >> >> >>>>>Cheers,
>>> >> >> >> >> >>>>>Andrew
>>> >> >> >> >> >>>>>
>>> >> >> >> >> >>>>>[1] https://github.com/alunny/pluginstall
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>
>>> >> >> >> >>
>>> >> >> >> >>
>>> >> >> >>
>>> >> >> >>
>>> >> >>
>>> >> >>
>>> >>
>>> >>
>>>
>>>
>>
>>
>> --
>> @purplecabbage
>> risingj.com


Re: Plugin Format and Spec

Posted by Shazron <sh...@gmail.com>.
pluginstall blocker:
https://github.com/alunny/node-xcode/issues/3
https://issues.apache.org/jira/browse/CB-631

Only works with node 0.6.17


On Mon, Jun 25, 2012 at 2:09 PM, Jesse <pu...@gmail.com> wrote:
> We could use an 'engine' type specification similar to npm :
> "engine": "node >= 0.4.1"
>
> http://blog.nodejs.org/2012/02/27/managing-node-js-dependencies-with-shrinkwrap/
>
>
> On Mon, Jun 25, 2012 at 2:02 PM, Filip Maj <fi...@adobe.com> wrote:
>
>> Ideally, I would think we do NOT plan on doing that post-2.0. That said,
>> our current deprecation policy, last I checked, was "6 months from now",
>> which does not guarantee that the API will not change between minor
>> revisions.
>>
>> Thus, the conversation turns back to project versioning and deprecation.
>>
>> Mike and I spoke about this this morning. I think both of us support the
>> idea of moving to semantic versioning for 2.0 and beyond.
>>
>> On 6/25/12 1:45 PM, "Anis KADRI" <an...@gmail.com> wrote:
>>
>> >Agreed fil, but are we planning on doing that for future releases ? If yes
>> >that YAH we should support versions and the solution you described is
>> >certainly an option. But if I were a plugin developer, I would not want to
>> >update it every month to keep up with Cordova releases.
>> >I don't disagree that there could be an Cordova version in the manifest
>> >file that allows plugin developers to target a specific version of Cordova
>> >(which would mean that the plugin was tested with that version but might
>> >also work with newer versions).
>> >
>> >On Mon, Jun 25, 2012 at 1:33 PM, Filip Maj <fi...@adobe.com> wrote:
>> >
>> >> Yes, it has changed every month. Pretty much every minor revision from
>> >>1.0
>> >> to 1.9 has changed the API (at least on Android).
>> >>
>> >> On 6/25/12 1:26 PM, "Anis KADRI" <an...@gmail.com> wrote:
>> >>
>> >> >Right but does the plugin interface change every month too ? A plugin
>> >>that
>> >> >works with Cordova 1.x.x is not supposed to work with Cordova 1.y.y ?
>> >> >
>> >> >On Mon, Jun 25, 2012 at 1:18 PM, Filip Maj <fi...@adobe.com> wrote:
>> >> >
>> >> >> You don't see any reason why plugins should support different
>> >>versions
>> >> >>of
>> >> >> cordova? Cordova gets released every month. This seems like a pretty
>> >> >> important thing to figure out IMO
>> >> >>
>> >> >> On 6/25/12 1:12 PM, "Anis KADRI" <an...@gmail.com> wrote:
>> >> >>
>> >> >> >I think we should agree on a spec (plugin package and plugin
>> >>interface)
>> >> >> >and
>> >> >> >stick to it. As long as we don't break the plugin interface, I don't
>> >> >>see
>> >> >> >any reason why plugins should support multiple versions of Cordova.
>> >>If
>> >> >> >there are any, I'd love to hear them.
>> >> >> >
>> >> >> >On Mon, Jun 25, 2012 at 1:01 PM, Filip Maj <fi...@adobe.com> wrote:
>> >> >> >
>> >> >> >> Back onto the versioning question..
>> >> >> >>
>> >> >> >> 1. Do we want to support different version of the cordova
>> >>framework
>> >> >>in
>> >> >> >> plugins, within a single repo, across versions that changed the
>> >> >> >> native/javascript plugin API?
>> >> >> >> 2. How?
>> >> >> >>
>> >> >> >> If the answer to (1) is yes, one idea for (2) might be nesting
>> >> >>another
>> >> >> >> directory level in the all of the source directories that contains
>> >> >>the
>> >> >> >> version number supported. For example:
>> >> >> >>
>> >> >> >> src/android/1.5.0/*.java
>> >> >> >> src/android/1.8.1/*.java
>> >> >> >> www/1.5.0/childbrowser.js
>> >> >> >> www/1.8.1/childbrowser.js
>> >> >> >>
>> >> >> >> Could get gnarly real quick though. Another, cleaner
>> >>implementation
>> >> >>in
>> >> >> >> terms of file system "noise" might be to employ a git branches
>> >> >> >> convention.. But that would enforce a git dependency.
>> >> >> >>
>> >> >> >> Just brainstorming / thinking out loud. Both are probably bad
>> >>ideas
>> >> >>:)
>> >> >> >>
>> >> >> >> On 6/25/12 11:41 AM, "Michael Brooks" <mi...@michaelbrooks.ca>
>> >> >>wrote:
>> >> >> >>
>> >> >> >> >We may also want to describe testing from JavaScript and Native.
>> >> >> >> >
>> >> >> >> >I would also like to see a repository called
>> >> >>"cordova-plugin-template"
>> >> >> >> >that
>> >> >> >> >is a boilerplate to start writing any plugin. The idea is that
>> >>users
>> >> >> >>start
>> >> >> >> >with something that works, with tests, and documentation
>> >> >>boilerplate -
>> >> >> >> >perhaps it can be an echo plugin since that has a minimal
>> >>footprint.
>> >> >> >> >
>> >> >> >> >On Mon, Jun 25, 2012 at 11:28 AM, Filip Maj <fi...@adobe.com>
>> >>wrote:
>> >> >> >> >
>> >> >> >> >> Looks great. I'll add some detail to the list you have here.
>> >>I'd
>> >> >> >> >>recommend
>> >> >> >> >> tweaking the order a little bit; introducing the JS before the
>> >> >>native
>> >> >> >> >>APIs.
>> >> >> >> >>
>> >> >> >> >> # Plugin Author Guide
>> >> >> >> >>
>> >> >> >> >> - plugin package format -> points to Andrew's plugin spec
>> >> >> >> >> - js api
>> >> >> >> >> --- basically documenting exec(). Service, action, callbacks,
>> >> >> >>arguments.
>> >> >> >> >> What about how arguments are translated from JS types (string,
>> >> >> >>number,
>> >> >> >> >> objects, etc) to native types for each platform?
>> >> >> >> >>
>> >> >> >> >> - native api
>> >> >> >> >> --- ios
>> >> >> >> >> --- android
>> >> >> >> >> --- blackberry
>> >> >> >> >> --- windowsphone
>> >> >> >> >> --- bada
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >> On 6/25/12 11:16 AM, "Brian LeRoux" <b...@brian.io> wrote:
>> >> >> >> >>
>> >> >> >> >> >Biggest question is how to document. My thinking is that we
>> >>want
>> >> >>to
>> >> >> >> >> >specify the PluginPackage so that PluginInstall works. So the
>> >> >>docs
>> >> >> >> >> >would read like this:
>> >> >> >> >> >
>> >> >> >> >> ># Plugin Author Guide
>> >> >> >> >> >
>> >> >> >> >> >- plugin package format
>> >> >> >> >> >- native api
>> >> >> >> >> >--- ios
>> >> >> >> >> >--- android
>> >> >> >> >> >--- blackberry
>> >> >> >> >> >--- windowsphone
>> >> >> >> >> >--- bada
>> >> >> >> >> >- js api
>> >> >> >> >> >
>> >> >> >> >> >Thoughts? (If this looks good I will update the issue.)
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >On Mon, Jun 25, 2012 at 10:50 AM, Filip Maj <fi...@adobe.com>
>> >> >>wrote:
>> >> >> >> >> >> Hah Michael and I were just talking about that..
>> >> >> >> >> >>
>> >> >> >> >> >> I will send a pull request to Andrew's draft spec
>> >> >> >> >> >>
>> >> >> >> >> >> On 6/25/12 10:46 AM, "Brian LeRoux" <b...@brian.io> wrote:
>> >> >> >> >> >>
>> >> >> >> >> >>>npm does this w/ an 'engines' attribute on package.json
>> >> >> >> >> >>>
>> >> >> >> >> >>>On Mon, Jun 25, 2012 at 10:26 AM, Filip Maj <fi...@adobe.com>
>> >> >> wrote:
>> >> >> >> >> >>>> One more thing that came to mind is how to support
>> >>different
>> >> >> >> >>versions
>> >> >> >> >> >>>>of Cordova? Any ideas?
>> >> >> >> >> >>>>
>> >> >> >> >> >>>> From: Andrew Lunny
>> >> >><al...@gmail.com>>
>> >> >> >> >> >>>> Reply-To: "alunny@gmail.com<ma...@gmail.com>"
>> >> >> >> >> >>>><al...@gmail.com>>
>> >> >> >> >> >>>> To: Default User Nam <fil@adobe.com<mailto:fil@adobe.com
>> >>
>> >> >> >> >> >>>> Cc:
>> >> >> >> >> >>>>"callback-dev@incubator.apache.org<mailto:
>> >> >> >> >> callback-dev@incubator.apache
>> >> >> >> >> >>>>.o
>> >> >> >> >> >>>>rg>"
>> >> >> >> >> >>>><callback-dev@incubator.apache.org<mailto:
>> >> >> >> >> callback-dev@incubator.apache
>> >> >> >> >> >>>>.o
>> >> >> >> >> >>>>rg>>
>> >> >> >> >> >>>> Subject: Re: Plugin Format and Spec
>> >> >> >> >> >>>>
>> >> >> >> >> >>>>
>> >> >> >> >> >>>>
>> >> >> >> >> >>>> On 11 June 2012 13:50, Filip Maj
>> >> >> >> >><fil@adobe.com<mailto:fil@adobe.com
>> >> >> >> >> >>
>> >> >> >> >> >>>>wrote:
>> >> >> >> >> >>>> Nice work Andrew! I suggest taking this and moving to a
>> >> >>cordova
>> >> >> >> >>wiki
>> >> >> >> >> >>>>page
>> >> >> >> >> >>>> (assuming all committers are on board to adopting this as
>> >>the
>> >> >> >>basis
>> >> >> >> >> >>>>for
>> >> >> >> >> >>>>a
>> >> >> >> >> >>>> plugin spec)
>> >> >> >> >> >>>>
>> >> >> >> >> >>>> A link on the Cordova wiki is probably the best place to
>> >> >>start
>> >> >> >>- we
>> >> >> >> >> >>>>can
>> >> >> >> >> >>>>get some more feedback from plugin authors and app
>> >>developers
>> >> >> >>(i.e.
>> >> >> >> >> >>>>keep
>> >> >> >> >> >>>>this as "a way to write plugins" rather than "the official
>> >> >>way to
>> >> >> >> >>write
>> >> >> >> >> >>>>plugins").
>> >> >> >> >> >>>>
>> >> >> >> >> >>>>
>> >> >> >> >> >>>> Is target-dir necessary for the <source-file> element? For
>> >> >>Java
>> >> >> >> >>files,
>> >> >> >> >> >>>>the
>> >> >> >> >> >>>> tooling could take a peak inside the .java file and
>> >>extract
>> >> >>out
>> >> >> >>the
>> >> >> >> >> >>>> package name from the file, no? Phonegap build already
>> >>does
>> >> >>this
>> >> >> >> >> >>>>doesn't
>> >> >> >> >> >>>> it?
>> >> >> >> >> >>>>
>> >> >> >> >> >>>> PhoneGap Build did do this, but no longer supports
>> >>uploading
>> >> >> >> >>arbitrary
>> >> >> >> >> >>>>Java files. Only plugins with a manifest are supported.
>> >> >> >> >> >>>>
>> >> >> >> >> >>>> I'm torn - one of the goals of this format is to make it
>> >>as
>> >> >> >>easy as
>> >> >> >> >> >>>>possible to write tools that use it as possible. Right
>> >>now, a
>> >> >> >>tool
>> >> >> >> >> >>>>reads
>> >> >> >> >> >>>>one file (plugin.xml) and moves source files (ignoring
>> >>config
>> >> >> >>files
>> >> >> >> >>for
>> >> >> >> >> >>>>the moment). I'd prefer it wasn't "read one file, then read
>> >> >>each
>> >> >> >> >>.java
>> >> >> >> >> >>>>file to discover where to move it".
>> >> >> >> >> >>>>
>> >> >> >> >> >>>> One option is to use the id attribute on the top-level
>> >>plugin
>> >> >> >> >>element
>> >> >> >> >> >>>>to resolve the path, but that doesn't handle the case where
>> >> >> >> >>different
>> >> >> >> >> >>>>Java files will have different paths. I wonder if there are
>> >> >>more
>> >> >> >> >> >>>>complex
>> >> >> >> >> >>>>plugins around we can try to convert to see where the pain
>> >> >>points
>> >> >> >> >>are.
>> >> >> >> >> >>>>
>> >> >> >> >> >>>>
>> >> >> >> >> >>>> Adding the ability to modify existing parts of a native
>> >> >> >>platform's
>> >> >> >> >> >>>>config
>> >> >> >> >> >>>> document to the <config-file> portion might be needed..
>> >> >>Although
>> >> >> >> >>Ive
>> >> >> >> >> >>>>yet
>> >> >> >> >> >>>> to dig up a use case. Will dig around more.
>> >> >> >> >> >>>>
>> >> >> >> >> >>>> Agreed - also things like target OS/SDK versions may be
>> >> >> >>required by
>> >> >> >> >> >>>>certain plugins (i.e. this plugin uses an iOS 6 API, so we
>> >> >>need
>> >> >> >>to
>> >> >> >> >> >>>>update your project to iOS 6). Probably the best approach
>> >> >>there
>> >> >> >>is
>> >> >> >> >>to
>> >> >> >> >> >>>>warn/prompt the user before proceeding.
>> >> >> >> >> >>>>
>> >> >> >> >> >>>> +1 agree that <resource-file> and <header-file> is
>> >>redundant.
>> >> >> >> >>Tooling
>> >> >> >> >> >>>> should be able to distinguish this so merging with
>> >> >><source-file>
>> >> >> >> >> >>>>makes a
>> >> >> >> >> >>>> lot of sense.
>> >> >> >> >> >>>>
>> >> >> >> >> >>>> Looking good!
>> >> >> >> >> >>>>
>> >> >> >> >> >>>> On 6/8/12 6:40 PM, "Andrew Lunny"
>> >> >> >> >> >>>><al...@gmail.com>> wrote:
>> >> >> >> >> >>>>
>> >> >> >> >> >>>>>Hi all,
>> >> >> >> >> >>>>>
>> >> >> >> >> >>>>>I've posted to this list before about pluginstall[1], the
>> >> >>tool
>> >> >> >>I've
>> >> >> >> >> >>>>>developed as part of working on PhoneGap Build and
>> >>requiring
>> >> >> >> >> >>>>>programmatic
>> >> >> >> >> >>>>>installation of Cordova plugins.
>> >> >> >> >> >>>>>
>> >> >> >> >> >>>>>I've now written up a spec for the format that pluginstall
>> >> >>uses
>> >> >> >>- I
>> >> >> >> >> >>>>>think
>> >> >> >> >> >>>>>it's generally useful for Cordova plugin installation and
>> >> >> >> >> >>>>>manipulation.
>> >> >> >> >> >>>>>The
>> >> >> >> >> >>>>>spec is available on GitHub:
>> >> >> >> >> >>>>>https://github.com/alunny/cordova-plugin-spec
>> >> >> >> >> >>>>>
>> >> >> >> >> >>>>>Issues and/or pull requests and/or forks welcome.
>> >> >> >> >> >>>>>
>> >> >> >> >> >>>>>Cheers,
>> >> >> >> >> >>>>>Andrew
>> >> >> >> >> >>>>>
>> >> >> >> >> >>>>>[1] https://github.com/alunny/pluginstall
>> >> >> >> >> >>>>
>> >> >> >> >> >>>>
>> >> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>>
>>
>
>
> --
> @purplecabbage
> risingj.com

Re: Plugin Format and Spec

Posted by Jesse <pu...@gmail.com>.
We could use an 'engine' type specification similar to npm :
"engine": "node >= 0.4.1"

http://blog.nodejs.org/2012/02/27/managing-node-js-dependencies-with-shrinkwrap/


On Mon, Jun 25, 2012 at 2:02 PM, Filip Maj <fi...@adobe.com> wrote:

> Ideally, I would think we do NOT plan on doing that post-2.0. That said,
> our current deprecation policy, last I checked, was "6 months from now",
> which does not guarantee that the API will not change between minor
> revisions.
>
> Thus, the conversation turns back to project versioning and deprecation.
>
> Mike and I spoke about this this morning. I think both of us support the
> idea of moving to semantic versioning for 2.0 and beyond.
>
> On 6/25/12 1:45 PM, "Anis KADRI" <an...@gmail.com> wrote:
>
> >Agreed fil, but are we planning on doing that for future releases ? If yes
> >that YAH we should support versions and the solution you described is
> >certainly an option. But if I were a plugin developer, I would not want to
> >update it every month to keep up with Cordova releases.
> >I don't disagree that there could be an Cordova version in the manifest
> >file that allows plugin developers to target a specific version of Cordova
> >(which would mean that the plugin was tested with that version but might
> >also work with newer versions).
> >
> >On Mon, Jun 25, 2012 at 1:33 PM, Filip Maj <fi...@adobe.com> wrote:
> >
> >> Yes, it has changed every month. Pretty much every minor revision from
> >>1.0
> >> to 1.9 has changed the API (at least on Android).
> >>
> >> On 6/25/12 1:26 PM, "Anis KADRI" <an...@gmail.com> wrote:
> >>
> >> >Right but does the plugin interface change every month too ? A plugin
> >>that
> >> >works with Cordova 1.x.x is not supposed to work with Cordova 1.y.y ?
> >> >
> >> >On Mon, Jun 25, 2012 at 1:18 PM, Filip Maj <fi...@adobe.com> wrote:
> >> >
> >> >> You don't see any reason why plugins should support different
> >>versions
> >> >>of
> >> >> cordova? Cordova gets released every month. This seems like a pretty
> >> >> important thing to figure out IMO
> >> >>
> >> >> On 6/25/12 1:12 PM, "Anis KADRI" <an...@gmail.com> wrote:
> >> >>
> >> >> >I think we should agree on a spec (plugin package and plugin
> >>interface)
> >> >> >and
> >> >> >stick to it. As long as we don't break the plugin interface, I don't
> >> >>see
> >> >> >any reason why plugins should support multiple versions of Cordova.
> >>If
> >> >> >there are any, I'd love to hear them.
> >> >> >
> >> >> >On Mon, Jun 25, 2012 at 1:01 PM, Filip Maj <fi...@adobe.com> wrote:
> >> >> >
> >> >> >> Back onto the versioning question..
> >> >> >>
> >> >> >> 1. Do we want to support different version of the cordova
> >>framework
> >> >>in
> >> >> >> plugins, within a single repo, across versions that changed the
> >> >> >> native/javascript plugin API?
> >> >> >> 2. How?
> >> >> >>
> >> >> >> If the answer to (1) is yes, one idea for (2) might be nesting
> >> >>another
> >> >> >> directory level in the all of the source directories that contains
> >> >>the
> >> >> >> version number supported. For example:
> >> >> >>
> >> >> >> src/android/1.5.0/*.java
> >> >> >> src/android/1.8.1/*.java
> >> >> >> www/1.5.0/childbrowser.js
> >> >> >> www/1.8.1/childbrowser.js
> >> >> >>
> >> >> >> Could get gnarly real quick though. Another, cleaner
> >>implementation
> >> >>in
> >> >> >> terms of file system "noise" might be to employ a git branches
> >> >> >> convention.. But that would enforce a git dependency.
> >> >> >>
> >> >> >> Just brainstorming / thinking out loud. Both are probably bad
> >>ideas
> >> >>:)
> >> >> >>
> >> >> >> On 6/25/12 11:41 AM, "Michael Brooks" <mi...@michaelbrooks.ca>
> >> >>wrote:
> >> >> >>
> >> >> >> >We may also want to describe testing from JavaScript and Native.
> >> >> >> >
> >> >> >> >I would also like to see a repository called
> >> >>"cordova-plugin-template"
> >> >> >> >that
> >> >> >> >is a boilerplate to start writing any plugin. The idea is that
> >>users
> >> >> >>start
> >> >> >> >with something that works, with tests, and documentation
> >> >>boilerplate -
> >> >> >> >perhaps it can be an echo plugin since that has a minimal
> >>footprint.
> >> >> >> >
> >> >> >> >On Mon, Jun 25, 2012 at 11:28 AM, Filip Maj <fi...@adobe.com>
> >>wrote:
> >> >> >> >
> >> >> >> >> Looks great. I'll add some detail to the list you have here.
> >>I'd
> >> >> >> >>recommend
> >> >> >> >> tweaking the order a little bit; introducing the JS before the
> >> >>native
> >> >> >> >>APIs.
> >> >> >> >>
> >> >> >> >> # Plugin Author Guide
> >> >> >> >>
> >> >> >> >> - plugin package format -> points to Andrew's plugin spec
> >> >> >> >> - js api
> >> >> >> >> --- basically documenting exec(). Service, action, callbacks,
> >> >> >>arguments.
> >> >> >> >> What about how arguments are translated from JS types (string,
> >> >> >>number,
> >> >> >> >> objects, etc) to native types for each platform?
> >> >> >> >>
> >> >> >> >> - native api
> >> >> >> >> --- ios
> >> >> >> >> --- android
> >> >> >> >> --- blackberry
> >> >> >> >> --- windowsphone
> >> >> >> >> --- bada
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> On 6/25/12 11:16 AM, "Brian LeRoux" <b...@brian.io> wrote:
> >> >> >> >>
> >> >> >> >> >Biggest question is how to document. My thinking is that we
> >>want
> >> >>to
> >> >> >> >> >specify the PluginPackage so that PluginInstall works. So the
> >> >>docs
> >> >> >> >> >would read like this:
> >> >> >> >> >
> >> >> >> >> ># Plugin Author Guide
> >> >> >> >> >
> >> >> >> >> >- plugin package format
> >> >> >> >> >- native api
> >> >> >> >> >--- ios
> >> >> >> >> >--- android
> >> >> >> >> >--- blackberry
> >> >> >> >> >--- windowsphone
> >> >> >> >> >--- bada
> >> >> >> >> >- js api
> >> >> >> >> >
> >> >> >> >> >Thoughts? (If this looks good I will update the issue.)
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >On Mon, Jun 25, 2012 at 10:50 AM, Filip Maj <fi...@adobe.com>
> >> >>wrote:
> >> >> >> >> >> Hah Michael and I were just talking about that..
> >> >> >> >> >>
> >> >> >> >> >> I will send a pull request to Andrew's draft spec
> >> >> >> >> >>
> >> >> >> >> >> On 6/25/12 10:46 AM, "Brian LeRoux" <b...@brian.io> wrote:
> >> >> >> >> >>
> >> >> >> >> >>>npm does this w/ an 'engines' attribute on package.json
> >> >> >> >> >>>
> >> >> >> >> >>>On Mon, Jun 25, 2012 at 10:26 AM, Filip Maj <fi...@adobe.com>
> >> >> wrote:
> >> >> >> >> >>>> One more thing that came to mind is how to support
> >>different
> >> >> >> >>versions
> >> >> >> >> >>>>of Cordova? Any ideas?
> >> >> >> >> >>>>
> >> >> >> >> >>>> From: Andrew Lunny
> >> >><al...@gmail.com>>
> >> >> >> >> >>>> Reply-To: "alunny@gmail.com<ma...@gmail.com>"
> >> >> >> >> >>>><al...@gmail.com>>
> >> >> >> >> >>>> To: Default User Nam <fil@adobe.com<mailto:fil@adobe.com
> >>
> >> >> >> >> >>>> Cc:
> >> >> >> >> >>>>"callback-dev@incubator.apache.org<mailto:
> >> >> >> >> callback-dev@incubator.apache
> >> >> >> >> >>>>.o
> >> >> >> >> >>>>rg>"
> >> >> >> >> >>>><callback-dev@incubator.apache.org<mailto:
> >> >> >> >> callback-dev@incubator.apache
> >> >> >> >> >>>>.o
> >> >> >> >> >>>>rg>>
> >> >> >> >> >>>> Subject: Re: Plugin Format and Spec
> >> >> >> >> >>>>
> >> >> >> >> >>>>
> >> >> >> >> >>>>
> >> >> >> >> >>>> On 11 June 2012 13:50, Filip Maj
> >> >> >> >><fil@adobe.com<mailto:fil@adobe.com
> >> >> >> >> >>
> >> >> >> >> >>>>wrote:
> >> >> >> >> >>>> Nice work Andrew! I suggest taking this and moving to a
> >> >>cordova
> >> >> >> >>wiki
> >> >> >> >> >>>>page
> >> >> >> >> >>>> (assuming all committers are on board to adopting this as
> >>the
> >> >> >>basis
> >> >> >> >> >>>>for
> >> >> >> >> >>>>a
> >> >> >> >> >>>> plugin spec)
> >> >> >> >> >>>>
> >> >> >> >> >>>> A link on the Cordova wiki is probably the best place to
> >> >>start
> >> >> >>- we
> >> >> >> >> >>>>can
> >> >> >> >> >>>>get some more feedback from plugin authors and app
> >>developers
> >> >> >>(i.e.
> >> >> >> >> >>>>keep
> >> >> >> >> >>>>this as "a way to write plugins" rather than "the official
> >> >>way to
> >> >> >> >>write
> >> >> >> >> >>>>plugins").
> >> >> >> >> >>>>
> >> >> >> >> >>>>
> >> >> >> >> >>>> Is target-dir necessary for the <source-file> element? For
> >> >>Java
> >> >> >> >>files,
> >> >> >> >> >>>>the
> >> >> >> >> >>>> tooling could take a peak inside the .java file and
> >>extract
> >> >>out
> >> >> >>the
> >> >> >> >> >>>> package name from the file, no? Phonegap build already
> >>does
> >> >>this
> >> >> >> >> >>>>doesn't
> >> >> >> >> >>>> it?
> >> >> >> >> >>>>
> >> >> >> >> >>>> PhoneGap Build did do this, but no longer supports
> >>uploading
> >> >> >> >>arbitrary
> >> >> >> >> >>>>Java files. Only plugins with a manifest are supported.
> >> >> >> >> >>>>
> >> >> >> >> >>>> I'm torn - one of the goals of this format is to make it
> >>as
> >> >> >>easy as
> >> >> >> >> >>>>possible to write tools that use it as possible. Right
> >>now, a
> >> >> >>tool
> >> >> >> >> >>>>reads
> >> >> >> >> >>>>one file (plugin.xml) and moves source files (ignoring
> >>config
> >> >> >>files
> >> >> >> >>for
> >> >> >> >> >>>>the moment). I'd prefer it wasn't "read one file, then read
> >> >>each
> >> >> >> >>.java
> >> >> >> >> >>>>file to discover where to move it".
> >> >> >> >> >>>>
> >> >> >> >> >>>> One option is to use the id attribute on the top-level
> >>plugin
> >> >> >> >>element
> >> >> >> >> >>>>to resolve the path, but that doesn't handle the case where
> >> >> >> >>different
> >> >> >> >> >>>>Java files will have different paths. I wonder if there are
> >> >>more
> >> >> >> >> >>>>complex
> >> >> >> >> >>>>plugins around we can try to convert to see where the pain
> >> >>points
> >> >> >> >>are.
> >> >> >> >> >>>>
> >> >> >> >> >>>>
> >> >> >> >> >>>> Adding the ability to modify existing parts of a native
> >> >> >>platform's
> >> >> >> >> >>>>config
> >> >> >> >> >>>> document to the <config-file> portion might be needed..
> >> >>Although
> >> >> >> >>Ive
> >> >> >> >> >>>>yet
> >> >> >> >> >>>> to dig up a use case. Will dig around more.
> >> >> >> >> >>>>
> >> >> >> >> >>>> Agreed - also things like target OS/SDK versions may be
> >> >> >>required by
> >> >> >> >> >>>>certain plugins (i.e. this plugin uses an iOS 6 API, so we
> >> >>need
> >> >> >>to
> >> >> >> >> >>>>update your project to iOS 6). Probably the best approach
> >> >>there
> >> >> >>is
> >> >> >> >>to
> >> >> >> >> >>>>warn/prompt the user before proceeding.
> >> >> >> >> >>>>
> >> >> >> >> >>>> +1 agree that <resource-file> and <header-file> is
> >>redundant.
> >> >> >> >>Tooling
> >> >> >> >> >>>> should be able to distinguish this so merging with
> >> >><source-file>
> >> >> >> >> >>>>makes a
> >> >> >> >> >>>> lot of sense.
> >> >> >> >> >>>>
> >> >> >> >> >>>> Looking good!
> >> >> >> >> >>>>
> >> >> >> >> >>>> On 6/8/12 6:40 PM, "Andrew Lunny"
> >> >> >> >> >>>><al...@gmail.com>> wrote:
> >> >> >> >> >>>>
> >> >> >> >> >>>>>Hi all,
> >> >> >> >> >>>>>
> >> >> >> >> >>>>>I've posted to this list before about pluginstall[1], the
> >> >>tool
> >> >> >>I've
> >> >> >> >> >>>>>developed as part of working on PhoneGap Build and
> >>requiring
> >> >> >> >> >>>>>programmatic
> >> >> >> >> >>>>>installation of Cordova plugins.
> >> >> >> >> >>>>>
> >> >> >> >> >>>>>I've now written up a spec for the format that pluginstall
> >> >>uses
> >> >> >>- I
> >> >> >> >> >>>>>think
> >> >> >> >> >>>>>it's generally useful for Cordova plugin installation and
> >> >> >> >> >>>>>manipulation.
> >> >> >> >> >>>>>The
> >> >> >> >> >>>>>spec is available on GitHub:
> >> >> >> >> >>>>>https://github.com/alunny/cordova-plugin-spec
> >> >> >> >> >>>>>
> >> >> >> >> >>>>>Issues and/or pull requests and/or forks welcome.
> >> >> >> >> >>>>>
> >> >> >> >> >>>>>Cheers,
> >> >> >> >> >>>>>Andrew
> >> >> >> >> >>>>>
> >> >> >> >> >>>>>[1] https://github.com/alunny/pluginstall
> >> >> >> >> >>>>
> >> >> >> >> >>>>
> >> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >>
> >> >> >>
> >> >>
> >> >>
> >>
> >>
>
>


-- 
@purplecabbage
risingj.com

Re: Plugin Format and Spec

Posted by Filip Maj <fi...@adobe.com>.
Ideally, I would think we do NOT plan on doing that post-2.0. That said,
our current deprecation policy, last I checked, was "6 months from now",
which does not guarantee that the API will not change between minor
revisions.

Thus, the conversation turns back to project versioning and deprecation.

Mike and I spoke about this this morning. I think both of us support the
idea of moving to semantic versioning for 2.0 and beyond.

On 6/25/12 1:45 PM, "Anis KADRI" <an...@gmail.com> wrote:

>Agreed fil, but are we planning on doing that for future releases ? If yes
>that YAH we should support versions and the solution you described is
>certainly an option. But if I were a plugin developer, I would not want to
>update it every month to keep up with Cordova releases.
>I don't disagree that there could be an Cordova version in the manifest
>file that allows plugin developers to target a specific version of Cordova
>(which would mean that the plugin was tested with that version but might
>also work with newer versions).
>
>On Mon, Jun 25, 2012 at 1:33 PM, Filip Maj <fi...@adobe.com> wrote:
>
>> Yes, it has changed every month. Pretty much every minor revision from
>>1.0
>> to 1.9 has changed the API (at least on Android).
>>
>> On 6/25/12 1:26 PM, "Anis KADRI" <an...@gmail.com> wrote:
>>
>> >Right but does the plugin interface change every month too ? A plugin
>>that
>> >works with Cordova 1.x.x is not supposed to work with Cordova 1.y.y ?
>> >
>> >On Mon, Jun 25, 2012 at 1:18 PM, Filip Maj <fi...@adobe.com> wrote:
>> >
>> >> You don't see any reason why plugins should support different
>>versions
>> >>of
>> >> cordova? Cordova gets released every month. This seems like a pretty
>> >> important thing to figure out IMO
>> >>
>> >> On 6/25/12 1:12 PM, "Anis KADRI" <an...@gmail.com> wrote:
>> >>
>> >> >I think we should agree on a spec (plugin package and plugin
>>interface)
>> >> >and
>> >> >stick to it. As long as we don't break the plugin interface, I don't
>> >>see
>> >> >any reason why plugins should support multiple versions of Cordova.
>>If
>> >> >there are any, I'd love to hear them.
>> >> >
>> >> >On Mon, Jun 25, 2012 at 1:01 PM, Filip Maj <fi...@adobe.com> wrote:
>> >> >
>> >> >> Back onto the versioning question..
>> >> >>
>> >> >> 1. Do we want to support different version of the cordova
>>framework
>> >>in
>> >> >> plugins, within a single repo, across versions that changed the
>> >> >> native/javascript plugin API?
>> >> >> 2. How?
>> >> >>
>> >> >> If the answer to (1) is yes, one idea for (2) might be nesting
>> >>another
>> >> >> directory level in the all of the source directories that contains
>> >>the
>> >> >> version number supported. For example:
>> >> >>
>> >> >> src/android/1.5.0/*.java
>> >> >> src/android/1.8.1/*.java
>> >> >> www/1.5.0/childbrowser.js
>> >> >> www/1.8.1/childbrowser.js
>> >> >>
>> >> >> Could get gnarly real quick though. Another, cleaner
>>implementation
>> >>in
>> >> >> terms of file system "noise" might be to employ a git branches
>> >> >> convention.. But that would enforce a git dependency.
>> >> >>
>> >> >> Just brainstorming / thinking out loud. Both are probably bad
>>ideas
>> >>:)
>> >> >>
>> >> >> On 6/25/12 11:41 AM, "Michael Brooks" <mi...@michaelbrooks.ca>
>> >>wrote:
>> >> >>
>> >> >> >We may also want to describe testing from JavaScript and Native.
>> >> >> >
>> >> >> >I would also like to see a repository called
>> >>"cordova-plugin-template"
>> >> >> >that
>> >> >> >is a boilerplate to start writing any plugin. The idea is that
>>users
>> >> >>start
>> >> >> >with something that works, with tests, and documentation
>> >>boilerplate -
>> >> >> >perhaps it can be an echo plugin since that has a minimal
>>footprint.
>> >> >> >
>> >> >> >On Mon, Jun 25, 2012 at 11:28 AM, Filip Maj <fi...@adobe.com>
>>wrote:
>> >> >> >
>> >> >> >> Looks great. I'll add some detail to the list you have here.
>>I'd
>> >> >> >>recommend
>> >> >> >> tweaking the order a little bit; introducing the JS before the
>> >>native
>> >> >> >>APIs.
>> >> >> >>
>> >> >> >> # Plugin Author Guide
>> >> >> >>
>> >> >> >> - plugin package format -> points to Andrew's plugin spec
>> >> >> >> - js api
>> >> >> >> --- basically documenting exec(). Service, action, callbacks,
>> >> >>arguments.
>> >> >> >> What about how arguments are translated from JS types (string,
>> >> >>number,
>> >> >> >> objects, etc) to native types for each platform?
>> >> >> >>
>> >> >> >> - native api
>> >> >> >> --- ios
>> >> >> >> --- android
>> >> >> >> --- blackberry
>> >> >> >> --- windowsphone
>> >> >> >> --- bada
>> >> >> >>
>> >> >> >>
>> >> >> >> On 6/25/12 11:16 AM, "Brian LeRoux" <b...@brian.io> wrote:
>> >> >> >>
>> >> >> >> >Biggest question is how to document. My thinking is that we
>>want
>> >>to
>> >> >> >> >specify the PluginPackage so that PluginInstall works. So the
>> >>docs
>> >> >> >> >would read like this:
>> >> >> >> >
>> >> >> >> ># Plugin Author Guide
>> >> >> >> >
>> >> >> >> >- plugin package format
>> >> >> >> >- native api
>> >> >> >> >--- ios
>> >> >> >> >--- android
>> >> >> >> >--- blackberry
>> >> >> >> >--- windowsphone
>> >> >> >> >--- bada
>> >> >> >> >- js api
>> >> >> >> >
>> >> >> >> >Thoughts? (If this looks good I will update the issue.)
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >On Mon, Jun 25, 2012 at 10:50 AM, Filip Maj <fi...@adobe.com>
>> >>wrote:
>> >> >> >> >> Hah Michael and I were just talking about that..
>> >> >> >> >>
>> >> >> >> >> I will send a pull request to Andrew's draft spec
>> >> >> >> >>
>> >> >> >> >> On 6/25/12 10:46 AM, "Brian LeRoux" <b...@brian.io> wrote:
>> >> >> >> >>
>> >> >> >> >>>npm does this w/ an 'engines' attribute on package.json
>> >> >> >> >>>
>> >> >> >> >>>On Mon, Jun 25, 2012 at 10:26 AM, Filip Maj <fi...@adobe.com>
>> >> wrote:
>> >> >> >> >>>> One more thing that came to mind is how to support
>>different
>> >> >> >>versions
>> >> >> >> >>>>of Cordova? Any ideas?
>> >> >> >> >>>>
>> >> >> >> >>>> From: Andrew Lunny
>> >><al...@gmail.com>>
>> >> >> >> >>>> Reply-To: "alunny@gmail.com<ma...@gmail.com>"
>> >> >> >> >>>><al...@gmail.com>>
>> >> >> >> >>>> To: Default User Nam <fi...@adobe.com>>
>> >> >> >> >>>> Cc:
>> >> >> >> >>>>"callback-dev@incubator.apache.org<mailto:
>> >> >> >> callback-dev@incubator.apache
>> >> >> >> >>>>.o
>> >> >> >> >>>>rg>"
>> >> >> >> >>>><callback-dev@incubator.apache.org<mailto:
>> >> >> >> callback-dev@incubator.apache
>> >> >> >> >>>>.o
>> >> >> >> >>>>rg>>
>> >> >> >> >>>> Subject: Re: Plugin Format and Spec
>> >> >> >> >>>>
>> >> >> >> >>>>
>> >> >> >> >>>>
>> >> >> >> >>>> On 11 June 2012 13:50, Filip Maj
>> >> >> >><fil@adobe.com<mailto:fil@adobe.com
>> >> >> >> >>
>> >> >> >> >>>>wrote:
>> >> >> >> >>>> Nice work Andrew! I suggest taking this and moving to a
>> >>cordova
>> >> >> >>wiki
>> >> >> >> >>>>page
>> >> >> >> >>>> (assuming all committers are on board to adopting this as
>>the
>> >> >>basis
>> >> >> >> >>>>for
>> >> >> >> >>>>a
>> >> >> >> >>>> plugin spec)
>> >> >> >> >>>>
>> >> >> >> >>>> A link on the Cordova wiki is probably the best place to
>> >>start
>> >> >>- we
>> >> >> >> >>>>can
>> >> >> >> >>>>get some more feedback from plugin authors and app
>>developers
>> >> >>(i.e.
>> >> >> >> >>>>keep
>> >> >> >> >>>>this as "a way to write plugins" rather than "the official
>> >>way to
>> >> >> >>write
>> >> >> >> >>>>plugins").
>> >> >> >> >>>>
>> >> >> >> >>>>
>> >> >> >> >>>> Is target-dir necessary for the <source-file> element? For
>> >>Java
>> >> >> >>files,
>> >> >> >> >>>>the
>> >> >> >> >>>> tooling could take a peak inside the .java file and
>>extract
>> >>out
>> >> >>the
>> >> >> >> >>>> package name from the file, no? Phonegap build already
>>does
>> >>this
>> >> >> >> >>>>doesn't
>> >> >> >> >>>> it?
>> >> >> >> >>>>
>> >> >> >> >>>> PhoneGap Build did do this, but no longer supports
>>uploading
>> >> >> >>arbitrary
>> >> >> >> >>>>Java files. Only plugins with a manifest are supported.
>> >> >> >> >>>>
>> >> >> >> >>>> I'm torn - one of the goals of this format is to make it
>>as
>> >> >>easy as
>> >> >> >> >>>>possible to write tools that use it as possible. Right
>>now, a
>> >> >>tool
>> >> >> >> >>>>reads
>> >> >> >> >>>>one file (plugin.xml) and moves source files (ignoring
>>config
>> >> >>files
>> >> >> >>for
>> >> >> >> >>>>the moment). I'd prefer it wasn't "read one file, then read
>> >>each
>> >> >> >>.java
>> >> >> >> >>>>file to discover where to move it".
>> >> >> >> >>>>
>> >> >> >> >>>> One option is to use the id attribute on the top-level
>>plugin
>> >> >> >>element
>> >> >> >> >>>>to resolve the path, but that doesn't handle the case where
>> >> >> >>different
>> >> >> >> >>>>Java files will have different paths. I wonder if there are
>> >>more
>> >> >> >> >>>>complex
>> >> >> >> >>>>plugins around we can try to convert to see where the pain
>> >>points
>> >> >> >>are.
>> >> >> >> >>>>
>> >> >> >> >>>>
>> >> >> >> >>>> Adding the ability to modify existing parts of a native
>> >> >>platform's
>> >> >> >> >>>>config
>> >> >> >> >>>> document to the <config-file> portion might be needed..
>> >>Although
>> >> >> >>Ive
>> >> >> >> >>>>yet
>> >> >> >> >>>> to dig up a use case. Will dig around more.
>> >> >> >> >>>>
>> >> >> >> >>>> Agreed - also things like target OS/SDK versions may be
>> >> >>required by
>> >> >> >> >>>>certain plugins (i.e. this plugin uses an iOS 6 API, so we
>> >>need
>> >> >>to
>> >> >> >> >>>>update your project to iOS 6). Probably the best approach
>> >>there
>> >> >>is
>> >> >> >>to
>> >> >> >> >>>>warn/prompt the user before proceeding.
>> >> >> >> >>>>
>> >> >> >> >>>> +1 agree that <resource-file> and <header-file> is
>>redundant.
>> >> >> >>Tooling
>> >> >> >> >>>> should be able to distinguish this so merging with
>> >><source-file>
>> >> >> >> >>>>makes a
>> >> >> >> >>>> lot of sense.
>> >> >> >> >>>>
>> >> >> >> >>>> Looking good!
>> >> >> >> >>>>
>> >> >> >> >>>> On 6/8/12 6:40 PM, "Andrew Lunny"
>> >> >> >> >>>><al...@gmail.com>> wrote:
>> >> >> >> >>>>
>> >> >> >> >>>>>Hi all,
>> >> >> >> >>>>>
>> >> >> >> >>>>>I've posted to this list before about pluginstall[1], the
>> >>tool
>> >> >>I've
>> >> >> >> >>>>>developed as part of working on PhoneGap Build and
>>requiring
>> >> >> >> >>>>>programmatic
>> >> >> >> >>>>>installation of Cordova plugins.
>> >> >> >> >>>>>
>> >> >> >> >>>>>I've now written up a spec for the format that pluginstall
>> >>uses
>> >> >>- I
>> >> >> >> >>>>>think
>> >> >> >> >>>>>it's generally useful for Cordova plugin installation and
>> >> >> >> >>>>>manipulation.
>> >> >> >> >>>>>The
>> >> >> >> >>>>>spec is available on GitHub:
>> >> >> >> >>>>>https://github.com/alunny/cordova-plugin-spec
>> >> >> >> >>>>>
>> >> >> >> >>>>>Issues and/or pull requests and/or forks welcome.
>> >> >> >> >>>>>
>> >> >> >> >>>>>Cheers,
>> >> >> >> >>>>>Andrew
>> >> >> >> >>>>>
>> >> >> >> >>>>>[1] https://github.com/alunny/pluginstall
>> >> >> >> >>>>
>> >> >> >> >>>>
>> >> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>>
>>


Re: Plugin Format and Spec

Posted by Anis KADRI <an...@gmail.com>.
Agreed fil, but are we planning on doing that for future releases ? If yes
that YAH we should support versions and the solution you described is
certainly an option. But if I were a plugin developer, I would not want to
update it every month to keep up with Cordova releases.
I don't disagree that there could be an Cordova version in the manifest
file that allows plugin developers to target a specific version of Cordova
(which would mean that the plugin was tested with that version but might
also work with newer versions).

On Mon, Jun 25, 2012 at 1:33 PM, Filip Maj <fi...@adobe.com> wrote:

> Yes, it has changed every month. Pretty much every minor revision from 1.0
> to 1.9 has changed the API (at least on Android).
>
> On 6/25/12 1:26 PM, "Anis KADRI" <an...@gmail.com> wrote:
>
> >Right but does the plugin interface change every month too ? A plugin that
> >works with Cordova 1.x.x is not supposed to work with Cordova 1.y.y ?
> >
> >On Mon, Jun 25, 2012 at 1:18 PM, Filip Maj <fi...@adobe.com> wrote:
> >
> >> You don't see any reason why plugins should support different versions
> >>of
> >> cordova? Cordova gets released every month. This seems like a pretty
> >> important thing to figure out IMO
> >>
> >> On 6/25/12 1:12 PM, "Anis KADRI" <an...@gmail.com> wrote:
> >>
> >> >I think we should agree on a spec (plugin package and plugin interface)
> >> >and
> >> >stick to it. As long as we don't break the plugin interface, I don't
> >>see
> >> >any reason why plugins should support multiple versions of Cordova. If
> >> >there are any, I'd love to hear them.
> >> >
> >> >On Mon, Jun 25, 2012 at 1:01 PM, Filip Maj <fi...@adobe.com> wrote:
> >> >
> >> >> Back onto the versioning question..
> >> >>
> >> >> 1. Do we want to support different version of the cordova framework
> >>in
> >> >> plugins, within a single repo, across versions that changed the
> >> >> native/javascript plugin API?
> >> >> 2. How?
> >> >>
> >> >> If the answer to (1) is yes, one idea for (2) might be nesting
> >>another
> >> >> directory level in the all of the source directories that contains
> >>the
> >> >> version number supported. For example:
> >> >>
> >> >> src/android/1.5.0/*.java
> >> >> src/android/1.8.1/*.java
> >> >> www/1.5.0/childbrowser.js
> >> >> www/1.8.1/childbrowser.js
> >> >>
> >> >> Could get gnarly real quick though. Another, cleaner implementation
> >>in
> >> >> terms of file system "noise" might be to employ a git branches
> >> >> convention.. But that would enforce a git dependency.
> >> >>
> >> >> Just brainstorming / thinking out loud. Both are probably bad ideas
> >>:)
> >> >>
> >> >> On 6/25/12 11:41 AM, "Michael Brooks" <mi...@michaelbrooks.ca>
> >>wrote:
> >> >>
> >> >> >We may also want to describe testing from JavaScript and Native.
> >> >> >
> >> >> >I would also like to see a repository called
> >>"cordova-plugin-template"
> >> >> >that
> >> >> >is a boilerplate to start writing any plugin. The idea is that users
> >> >>start
> >> >> >with something that works, with tests, and documentation
> >>boilerplate -
> >> >> >perhaps it can be an echo plugin since that has a minimal footprint.
> >> >> >
> >> >> >On Mon, Jun 25, 2012 at 11:28 AM, Filip Maj <fi...@adobe.com> wrote:
> >> >> >
> >> >> >> Looks great. I'll add some detail to the list you have here. I'd
> >> >> >>recommend
> >> >> >> tweaking the order a little bit; introducing the JS before the
> >>native
> >> >> >>APIs.
> >> >> >>
> >> >> >> # Plugin Author Guide
> >> >> >>
> >> >> >> - plugin package format -> points to Andrew's plugin spec
> >> >> >> - js api
> >> >> >> --- basically documenting exec(). Service, action, callbacks,
> >> >>arguments.
> >> >> >> What about how arguments are translated from JS types (string,
> >> >>number,
> >> >> >> objects, etc) to native types for each platform?
> >> >> >>
> >> >> >> - native api
> >> >> >> --- ios
> >> >> >> --- android
> >> >> >> --- blackberry
> >> >> >> --- windowsphone
> >> >> >> --- bada
> >> >> >>
> >> >> >>
> >> >> >> On 6/25/12 11:16 AM, "Brian LeRoux" <b...@brian.io> wrote:
> >> >> >>
> >> >> >> >Biggest question is how to document. My thinking is that we want
> >>to
> >> >> >> >specify the PluginPackage so that PluginInstall works. So the
> >>docs
> >> >> >> >would read like this:
> >> >> >> >
> >> >> >> ># Plugin Author Guide
> >> >> >> >
> >> >> >> >- plugin package format
> >> >> >> >- native api
> >> >> >> >--- ios
> >> >> >> >--- android
> >> >> >> >--- blackberry
> >> >> >> >--- windowsphone
> >> >> >> >--- bada
> >> >> >> >- js api
> >> >> >> >
> >> >> >> >Thoughts? (If this looks good I will update the issue.)
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >On Mon, Jun 25, 2012 at 10:50 AM, Filip Maj <fi...@adobe.com>
> >>wrote:
> >> >> >> >> Hah Michael and I were just talking about that..
> >> >> >> >>
> >> >> >> >> I will send a pull request to Andrew's draft spec
> >> >> >> >>
> >> >> >> >> On 6/25/12 10:46 AM, "Brian LeRoux" <b...@brian.io> wrote:
> >> >> >> >>
> >> >> >> >>>npm does this w/ an 'engines' attribute on package.json
> >> >> >> >>>
> >> >> >> >>>On Mon, Jun 25, 2012 at 10:26 AM, Filip Maj <fi...@adobe.com>
> >> wrote:
> >> >> >> >>>> One more thing that came to mind is how to support different
> >> >> >>versions
> >> >> >> >>>>of Cordova? Any ideas?
> >> >> >> >>>>
> >> >> >> >>>> From: Andrew Lunny
> >><al...@gmail.com>>
> >> >> >> >>>> Reply-To: "alunny@gmail.com<ma...@gmail.com>"
> >> >> >> >>>><al...@gmail.com>>
> >> >> >> >>>> To: Default User Nam <fi...@adobe.com>>
> >> >> >> >>>> Cc:
> >> >> >> >>>>"callback-dev@incubator.apache.org<mailto:
> >> >> >> callback-dev@incubator.apache
> >> >> >> >>>>.o
> >> >> >> >>>>rg>"
> >> >> >> >>>><callback-dev@incubator.apache.org<mailto:
> >> >> >> callback-dev@incubator.apache
> >> >> >> >>>>.o
> >> >> >> >>>>rg>>
> >> >> >> >>>> Subject: Re: Plugin Format and Spec
> >> >> >> >>>>
> >> >> >> >>>>
> >> >> >> >>>>
> >> >> >> >>>> On 11 June 2012 13:50, Filip Maj
> >> >> >><fil@adobe.com<mailto:fil@adobe.com
> >> >> >> >>
> >> >> >> >>>>wrote:
> >> >> >> >>>> Nice work Andrew! I suggest taking this and moving to a
> >>cordova
> >> >> >>wiki
> >> >> >> >>>>page
> >> >> >> >>>> (assuming all committers are on board to adopting this as the
> >> >>basis
> >> >> >> >>>>for
> >> >> >> >>>>a
> >> >> >> >>>> plugin spec)
> >> >> >> >>>>
> >> >> >> >>>> A link on the Cordova wiki is probably the best place to
> >>start
> >> >>- we
> >> >> >> >>>>can
> >> >> >> >>>>get some more feedback from plugin authors and app developers
> >> >>(i.e.
> >> >> >> >>>>keep
> >> >> >> >>>>this as "a way to write plugins" rather than "the official
> >>way to
> >> >> >>write
> >> >> >> >>>>plugins").
> >> >> >> >>>>
> >> >> >> >>>>
> >> >> >> >>>> Is target-dir necessary for the <source-file> element? For
> >>Java
> >> >> >>files,
> >> >> >> >>>>the
> >> >> >> >>>> tooling could take a peak inside the .java file and extract
> >>out
> >> >>the
> >> >> >> >>>> package name from the file, no? Phonegap build already does
> >>this
> >> >> >> >>>>doesn't
> >> >> >> >>>> it?
> >> >> >> >>>>
> >> >> >> >>>> PhoneGap Build did do this, but no longer supports uploading
> >> >> >>arbitrary
> >> >> >> >>>>Java files. Only plugins with a manifest are supported.
> >> >> >> >>>>
> >> >> >> >>>> I'm torn - one of the goals of this format is to make it as
> >> >>easy as
> >> >> >> >>>>possible to write tools that use it as possible. Right now, a
> >> >>tool
> >> >> >> >>>>reads
> >> >> >> >>>>one file (plugin.xml) and moves source files (ignoring config
> >> >>files
> >> >> >>for
> >> >> >> >>>>the moment). I'd prefer it wasn't "read one file, then read
> >>each
> >> >> >>.java
> >> >> >> >>>>file to discover where to move it".
> >> >> >> >>>>
> >> >> >> >>>> One option is to use the id attribute on the top-level plugin
> >> >> >>element
> >> >> >> >>>>to resolve the path, but that doesn't handle the case where
> >> >> >>different
> >> >> >> >>>>Java files will have different paths. I wonder if there are
> >>more
> >> >> >> >>>>complex
> >> >> >> >>>>plugins around we can try to convert to see where the pain
> >>points
> >> >> >>are.
> >> >> >> >>>>
> >> >> >> >>>>
> >> >> >> >>>> Adding the ability to modify existing parts of a native
> >> >>platform's
> >> >> >> >>>>config
> >> >> >> >>>> document to the <config-file> portion might be needed..
> >>Although
> >> >> >>Ive
> >> >> >> >>>>yet
> >> >> >> >>>> to dig up a use case. Will dig around more.
> >> >> >> >>>>
> >> >> >> >>>> Agreed - also things like target OS/SDK versions may be
> >> >>required by
> >> >> >> >>>>certain plugins (i.e. this plugin uses an iOS 6 API, so we
> >>need
> >> >>to
> >> >> >> >>>>update your project to iOS 6). Probably the best approach
> >>there
> >> >>is
> >> >> >>to
> >> >> >> >>>>warn/prompt the user before proceeding.
> >> >> >> >>>>
> >> >> >> >>>> +1 agree that <resource-file> and <header-file> is redundant.
> >> >> >>Tooling
> >> >> >> >>>> should be able to distinguish this so merging with
> >><source-file>
> >> >> >> >>>>makes a
> >> >> >> >>>> lot of sense.
> >> >> >> >>>>
> >> >> >> >>>> Looking good!
> >> >> >> >>>>
> >> >> >> >>>> On 6/8/12 6:40 PM, "Andrew Lunny"
> >> >> >> >>>><al...@gmail.com>> wrote:
> >> >> >> >>>>
> >> >> >> >>>>>Hi all,
> >> >> >> >>>>>
> >> >> >> >>>>>I've posted to this list before about pluginstall[1], the
> >>tool
> >> >>I've
> >> >> >> >>>>>developed as part of working on PhoneGap Build and requiring
> >> >> >> >>>>>programmatic
> >> >> >> >>>>>installation of Cordova plugins.
> >> >> >> >>>>>
> >> >> >> >>>>>I've now written up a spec for the format that pluginstall
> >>uses
> >> >>- I
> >> >> >> >>>>>think
> >> >> >> >>>>>it's generally useful for Cordova plugin installation and
> >> >> >> >>>>>manipulation.
> >> >> >> >>>>>The
> >> >> >> >>>>>spec is available on GitHub:
> >> >> >> >>>>>https://github.com/alunny/cordova-plugin-spec
> >> >> >> >>>>>
> >> >> >> >>>>>Issues and/or pull requests and/or forks welcome.
> >> >> >> >>>>>
> >> >> >> >>>>>Cheers,
> >> >> >> >>>>>Andrew
> >> >> >> >>>>>
> >> >> >> >>>>>[1] https://github.com/alunny/pluginstall
> >> >> >> >>>>
> >> >> >> >>>>
> >> >> >> >>
> >> >> >>
> >> >> >>
> >> >>
> >> >>
> >>
> >>
>
>

Re: Plugin Format and Spec

Posted by Filip Maj <fi...@adobe.com>.
Yes, it has changed every month. Pretty much every minor revision from 1.0
to 1.9 has changed the API (at least on Android).

On 6/25/12 1:26 PM, "Anis KADRI" <an...@gmail.com> wrote:

>Right but does the plugin interface change every month too ? A plugin that
>works with Cordova 1.x.x is not supposed to work with Cordova 1.y.y ?
>
>On Mon, Jun 25, 2012 at 1:18 PM, Filip Maj <fi...@adobe.com> wrote:
>
>> You don't see any reason why plugins should support different versions
>>of
>> cordova? Cordova gets released every month. This seems like a pretty
>> important thing to figure out IMO
>>
>> On 6/25/12 1:12 PM, "Anis KADRI" <an...@gmail.com> wrote:
>>
>> >I think we should agree on a spec (plugin package and plugin interface)
>> >and
>> >stick to it. As long as we don't break the plugin interface, I don't
>>see
>> >any reason why plugins should support multiple versions of Cordova. If
>> >there are any, I'd love to hear them.
>> >
>> >On Mon, Jun 25, 2012 at 1:01 PM, Filip Maj <fi...@adobe.com> wrote:
>> >
>> >> Back onto the versioning question..
>> >>
>> >> 1. Do we want to support different version of the cordova framework
>>in
>> >> plugins, within a single repo, across versions that changed the
>> >> native/javascript plugin API?
>> >> 2. How?
>> >>
>> >> If the answer to (1) is yes, one idea for (2) might be nesting
>>another
>> >> directory level in the all of the source directories that contains
>>the
>> >> version number supported. For example:
>> >>
>> >> src/android/1.5.0/*.java
>> >> src/android/1.8.1/*.java
>> >> www/1.5.0/childbrowser.js
>> >> www/1.8.1/childbrowser.js
>> >>
>> >> Could get gnarly real quick though. Another, cleaner implementation
>>in
>> >> terms of file system "noise" might be to employ a git branches
>> >> convention.. But that would enforce a git dependency.
>> >>
>> >> Just brainstorming / thinking out loud. Both are probably bad ideas
>>:)
>> >>
>> >> On 6/25/12 11:41 AM, "Michael Brooks" <mi...@michaelbrooks.ca>
>>wrote:
>> >>
>> >> >We may also want to describe testing from JavaScript and Native.
>> >> >
>> >> >I would also like to see a repository called
>>"cordova-plugin-template"
>> >> >that
>> >> >is a boilerplate to start writing any plugin. The idea is that users
>> >>start
>> >> >with something that works, with tests, and documentation
>>boilerplate -
>> >> >perhaps it can be an echo plugin since that has a minimal footprint.
>> >> >
>> >> >On Mon, Jun 25, 2012 at 11:28 AM, Filip Maj <fi...@adobe.com> wrote:
>> >> >
>> >> >> Looks great. I'll add some detail to the list you have here. I'd
>> >> >>recommend
>> >> >> tweaking the order a little bit; introducing the JS before the
>>native
>> >> >>APIs.
>> >> >>
>> >> >> # Plugin Author Guide
>> >> >>
>> >> >> - plugin package format -> points to Andrew's plugin spec
>> >> >> - js api
>> >> >> --- basically documenting exec(). Service, action, callbacks,
>> >>arguments.
>> >> >> What about how arguments are translated from JS types (string,
>> >>number,
>> >> >> objects, etc) to native types for each platform?
>> >> >>
>> >> >> - native api
>> >> >> --- ios
>> >> >> --- android
>> >> >> --- blackberry
>> >> >> --- windowsphone
>> >> >> --- bada
>> >> >>
>> >> >>
>> >> >> On 6/25/12 11:16 AM, "Brian LeRoux" <b...@brian.io> wrote:
>> >> >>
>> >> >> >Biggest question is how to document. My thinking is that we want
>>to
>> >> >> >specify the PluginPackage so that PluginInstall works. So the
>>docs
>> >> >> >would read like this:
>> >> >> >
>> >> >> ># Plugin Author Guide
>> >> >> >
>> >> >> >- plugin package format
>> >> >> >- native api
>> >> >> >--- ios
>> >> >> >--- android
>> >> >> >--- blackberry
>> >> >> >--- windowsphone
>> >> >> >--- bada
>> >> >> >- js api
>> >> >> >
>> >> >> >Thoughts? (If this looks good I will update the issue.)
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >On Mon, Jun 25, 2012 at 10:50 AM, Filip Maj <fi...@adobe.com>
>>wrote:
>> >> >> >> Hah Michael and I were just talking about that..
>> >> >> >>
>> >> >> >> I will send a pull request to Andrew's draft spec
>> >> >> >>
>> >> >> >> On 6/25/12 10:46 AM, "Brian LeRoux" <b...@brian.io> wrote:
>> >> >> >>
>> >> >> >>>npm does this w/ an 'engines' attribute on package.json
>> >> >> >>>
>> >> >> >>>On Mon, Jun 25, 2012 at 10:26 AM, Filip Maj <fi...@adobe.com>
>> wrote:
>> >> >> >>>> One more thing that came to mind is how to support different
>> >> >>versions
>> >> >> >>>>of Cordova? Any ideas?
>> >> >> >>>>
>> >> >> >>>> From: Andrew Lunny
>><al...@gmail.com>>
>> >> >> >>>> Reply-To: "alunny@gmail.com<ma...@gmail.com>"
>> >> >> >>>><al...@gmail.com>>
>> >> >> >>>> To: Default User Nam <fi...@adobe.com>>
>> >> >> >>>> Cc:
>> >> >> >>>>"callback-dev@incubator.apache.org<mailto:
>> >> >> callback-dev@incubator.apache
>> >> >> >>>>.o
>> >> >> >>>>rg>"
>> >> >> >>>><callback-dev@incubator.apache.org<mailto:
>> >> >> callback-dev@incubator.apache
>> >> >> >>>>.o
>> >> >> >>>>rg>>
>> >> >> >>>> Subject: Re: Plugin Format and Spec
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>> On 11 June 2012 13:50, Filip Maj
>> >> >><fil@adobe.com<mailto:fil@adobe.com
>> >> >> >>
>> >> >> >>>>wrote:
>> >> >> >>>> Nice work Andrew! I suggest taking this and moving to a
>>cordova
>> >> >>wiki
>> >> >> >>>>page
>> >> >> >>>> (assuming all committers are on board to adopting this as the
>> >>basis
>> >> >> >>>>for
>> >> >> >>>>a
>> >> >> >>>> plugin spec)
>> >> >> >>>>
>> >> >> >>>> A link on the Cordova wiki is probably the best place to
>>start
>> >>- we
>> >> >> >>>>can
>> >> >> >>>>get some more feedback from plugin authors and app developers
>> >>(i.e.
>> >> >> >>>>keep
>> >> >> >>>>this as "a way to write plugins" rather than "the official
>>way to
>> >> >>write
>> >> >> >>>>plugins").
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>> Is target-dir necessary for the <source-file> element? For
>>Java
>> >> >>files,
>> >> >> >>>>the
>> >> >> >>>> tooling could take a peak inside the .java file and extract
>>out
>> >>the
>> >> >> >>>> package name from the file, no? Phonegap build already does
>>this
>> >> >> >>>>doesn't
>> >> >> >>>> it?
>> >> >> >>>>
>> >> >> >>>> PhoneGap Build did do this, but no longer supports uploading
>> >> >>arbitrary
>> >> >> >>>>Java files. Only plugins with a manifest are supported.
>> >> >> >>>>
>> >> >> >>>> I'm torn - one of the goals of this format is to make it as
>> >>easy as
>> >> >> >>>>possible to write tools that use it as possible. Right now, a
>> >>tool
>> >> >> >>>>reads
>> >> >> >>>>one file (plugin.xml) and moves source files (ignoring config
>> >>files
>> >> >>for
>> >> >> >>>>the moment). I'd prefer it wasn't "read one file, then read
>>each
>> >> >>.java
>> >> >> >>>>file to discover where to move it".
>> >> >> >>>>
>> >> >> >>>> One option is to use the id attribute on the top-level plugin
>> >> >>element
>> >> >> >>>>to resolve the path, but that doesn't handle the case where
>> >> >>different
>> >> >> >>>>Java files will have different paths. I wonder if there are
>>more
>> >> >> >>>>complex
>> >> >> >>>>plugins around we can try to convert to see where the pain
>>points
>> >> >>are.
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>> Adding the ability to modify existing parts of a native
>> >>platform's
>> >> >> >>>>config
>> >> >> >>>> document to the <config-file> portion might be needed..
>>Although
>> >> >>Ive
>> >> >> >>>>yet
>> >> >> >>>> to dig up a use case. Will dig around more.
>> >> >> >>>>
>> >> >> >>>> Agreed - also things like target OS/SDK versions may be
>> >>required by
>> >> >> >>>>certain plugins (i.e. this plugin uses an iOS 6 API, so we
>>need
>> >>to
>> >> >> >>>>update your project to iOS 6). Probably the best approach
>>there
>> >>is
>> >> >>to
>> >> >> >>>>warn/prompt the user before proceeding.
>> >> >> >>>>
>> >> >> >>>> +1 agree that <resource-file> and <header-file> is redundant.
>> >> >>Tooling
>> >> >> >>>> should be able to distinguish this so merging with
>><source-file>
>> >> >> >>>>makes a
>> >> >> >>>> lot of sense.
>> >> >> >>>>
>> >> >> >>>> Looking good!
>> >> >> >>>>
>> >> >> >>>> On 6/8/12 6:40 PM, "Andrew Lunny"
>> >> >> >>>><al...@gmail.com>> wrote:
>> >> >> >>>>
>> >> >> >>>>>Hi all,
>> >> >> >>>>>
>> >> >> >>>>>I've posted to this list before about pluginstall[1], the
>>tool
>> >>I've
>> >> >> >>>>>developed as part of working on PhoneGap Build and requiring
>> >> >> >>>>>programmatic
>> >> >> >>>>>installation of Cordova plugins.
>> >> >> >>>>>
>> >> >> >>>>>I've now written up a spec for the format that pluginstall
>>uses
>> >>- I
>> >> >> >>>>>think
>> >> >> >>>>>it's generally useful for Cordova plugin installation and
>> >> >> >>>>>manipulation.
>> >> >> >>>>>The
>> >> >> >>>>>spec is available on GitHub:
>> >> >> >>>>>https://github.com/alunny/cordova-plugin-spec
>> >> >> >>>>>
>> >> >> >>>>>Issues and/or pull requests and/or forks welcome.
>> >> >> >>>>>
>> >> >> >>>>>Cheers,
>> >> >> >>>>>Andrew
>> >> >> >>>>>
>> >> >> >>>>>[1] https://github.com/alunny/pluginstall
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>>
>>


Re: Plugin Format and Spec

Posted by Anis KADRI <an...@gmail.com>.
Right but does the plugin interface change every month too ? A plugin that
works with Cordova 1.x.x is not supposed to work with Cordova 1.y.y ?

On Mon, Jun 25, 2012 at 1:18 PM, Filip Maj <fi...@adobe.com> wrote:

> You don't see any reason why plugins should support different versions of
> cordova? Cordova gets released every month. This seems like a pretty
> important thing to figure out IMO
>
> On 6/25/12 1:12 PM, "Anis KADRI" <an...@gmail.com> wrote:
>
> >I think we should agree on a spec (plugin package and plugin interface)
> >and
> >stick to it. As long as we don't break the plugin interface, I don't see
> >any reason why plugins should support multiple versions of Cordova. If
> >there are any, I'd love to hear them.
> >
> >On Mon, Jun 25, 2012 at 1:01 PM, Filip Maj <fi...@adobe.com> wrote:
> >
> >> Back onto the versioning question..
> >>
> >> 1. Do we want to support different version of the cordova framework in
> >> plugins, within a single repo, across versions that changed the
> >> native/javascript plugin API?
> >> 2. How?
> >>
> >> If the answer to (1) is yes, one idea for (2) might be nesting another
> >> directory level in the all of the source directories that contains the
> >> version number supported. For example:
> >>
> >> src/android/1.5.0/*.java
> >> src/android/1.8.1/*.java
> >> www/1.5.0/childbrowser.js
> >> www/1.8.1/childbrowser.js
> >>
> >> Could get gnarly real quick though. Another, cleaner implementation in
> >> terms of file system "noise" might be to employ a git branches
> >> convention.. But that would enforce a git dependency.
> >>
> >> Just brainstorming / thinking out loud. Both are probably bad ideas :)
> >>
> >> On 6/25/12 11:41 AM, "Michael Brooks" <mi...@michaelbrooks.ca> wrote:
> >>
> >> >We may also want to describe testing from JavaScript and Native.
> >> >
> >> >I would also like to see a repository called "cordova-plugin-template"
> >> >that
> >> >is a boilerplate to start writing any plugin. The idea is that users
> >>start
> >> >with something that works, with tests, and documentation boilerplate -
> >> >perhaps it can be an echo plugin since that has a minimal footprint.
> >> >
> >> >On Mon, Jun 25, 2012 at 11:28 AM, Filip Maj <fi...@adobe.com> wrote:
> >> >
> >> >> Looks great. I'll add some detail to the list you have here. I'd
> >> >>recommend
> >> >> tweaking the order a little bit; introducing the JS before the native
> >> >>APIs.
> >> >>
> >> >> # Plugin Author Guide
> >> >>
> >> >> - plugin package format -> points to Andrew's plugin spec
> >> >> - js api
> >> >> --- basically documenting exec(). Service, action, callbacks,
> >>arguments.
> >> >> What about how arguments are translated from JS types (string,
> >>number,
> >> >> objects, etc) to native types for each platform?
> >> >>
> >> >> - native api
> >> >> --- ios
> >> >> --- android
> >> >> --- blackberry
> >> >> --- windowsphone
> >> >> --- bada
> >> >>
> >> >>
> >> >> On 6/25/12 11:16 AM, "Brian LeRoux" <b...@brian.io> wrote:
> >> >>
> >> >> >Biggest question is how to document. My thinking is that we want to
> >> >> >specify the PluginPackage so that PluginInstall works. So the docs
> >> >> >would read like this:
> >> >> >
> >> >> ># Plugin Author Guide
> >> >> >
> >> >> >- plugin package format
> >> >> >- native api
> >> >> >--- ios
> >> >> >--- android
> >> >> >--- blackberry
> >> >> >--- windowsphone
> >> >> >--- bada
> >> >> >- js api
> >> >> >
> >> >> >Thoughts? (If this looks good I will update the issue.)
> >> >> >
> >> >> >
> >> >> >
> >> >> >On Mon, Jun 25, 2012 at 10:50 AM, Filip Maj <fi...@adobe.com> wrote:
> >> >> >> Hah Michael and I were just talking about that..
> >> >> >>
> >> >> >> I will send a pull request to Andrew's draft spec
> >> >> >>
> >> >> >> On 6/25/12 10:46 AM, "Brian LeRoux" <b...@brian.io> wrote:
> >> >> >>
> >> >> >>>npm does this w/ an 'engines' attribute on package.json
> >> >> >>>
> >> >> >>>On Mon, Jun 25, 2012 at 10:26 AM, Filip Maj <fi...@adobe.com>
> wrote:
> >> >> >>>> One more thing that came to mind is how to support different
> >> >>versions
> >> >> >>>>of Cordova? Any ideas?
> >> >> >>>>
> >> >> >>>> From: Andrew Lunny <al...@gmail.com>>
> >> >> >>>> Reply-To: "alunny@gmail.com<ma...@gmail.com>"
> >> >> >>>><al...@gmail.com>>
> >> >> >>>> To: Default User Nam <fi...@adobe.com>>
> >> >> >>>> Cc:
> >> >> >>>>"callback-dev@incubator.apache.org<mailto:
> >> >> callback-dev@incubator.apache
> >> >> >>>>.o
> >> >> >>>>rg>"
> >> >> >>>><callback-dev@incubator.apache.org<mailto:
> >> >> callback-dev@incubator.apache
> >> >> >>>>.o
> >> >> >>>>rg>>
> >> >> >>>> Subject: Re: Plugin Format and Spec
> >> >> >>>>
> >> >> >>>>
> >> >> >>>>
> >> >> >>>> On 11 June 2012 13:50, Filip Maj
> >> >><fil@adobe.com<mailto:fil@adobe.com
> >> >> >>
> >> >> >>>>wrote:
> >> >> >>>> Nice work Andrew! I suggest taking this and moving to a cordova
> >> >>wiki
> >> >> >>>>page
> >> >> >>>> (assuming all committers are on board to adopting this as the
> >>basis
> >> >> >>>>for
> >> >> >>>>a
> >> >> >>>> plugin spec)
> >> >> >>>>
> >> >> >>>> A link on the Cordova wiki is probably the best place to start
> >>- we
> >> >> >>>>can
> >> >> >>>>get some more feedback from plugin authors and app developers
> >>(i.e.
> >> >> >>>>keep
> >> >> >>>>this as "a way to write plugins" rather than "the official way to
> >> >>write
> >> >> >>>>plugins").
> >> >> >>>>
> >> >> >>>>
> >> >> >>>> Is target-dir necessary for the <source-file> element? For Java
> >> >>files,
> >> >> >>>>the
> >> >> >>>> tooling could take a peak inside the .java file and extract out
> >>the
> >> >> >>>> package name from the file, no? Phonegap build already does this
> >> >> >>>>doesn't
> >> >> >>>> it?
> >> >> >>>>
> >> >> >>>> PhoneGap Build did do this, but no longer supports uploading
> >> >>arbitrary
> >> >> >>>>Java files. Only plugins with a manifest are supported.
> >> >> >>>>
> >> >> >>>> I'm torn - one of the goals of this format is to make it as
> >>easy as
> >> >> >>>>possible to write tools that use it as possible. Right now, a
> >>tool
> >> >> >>>>reads
> >> >> >>>>one file (plugin.xml) and moves source files (ignoring config
> >>files
> >> >>for
> >> >> >>>>the moment). I'd prefer it wasn't "read one file, then read each
> >> >>.java
> >> >> >>>>file to discover where to move it".
> >> >> >>>>
> >> >> >>>> One option is to use the id attribute on the top-level plugin
> >> >>element
> >> >> >>>>to resolve the path, but that doesn't handle the case where
> >> >>different
> >> >> >>>>Java files will have different paths. I wonder if there are more
> >> >> >>>>complex
> >> >> >>>>plugins around we can try to convert to see where the pain points
> >> >>are.
> >> >> >>>>
> >> >> >>>>
> >> >> >>>> Adding the ability to modify existing parts of a native
> >>platform's
> >> >> >>>>config
> >> >> >>>> document to the <config-file> portion might be needed.. Although
> >> >>Ive
> >> >> >>>>yet
> >> >> >>>> to dig up a use case. Will dig around more.
> >> >> >>>>
> >> >> >>>> Agreed - also things like target OS/SDK versions may be
> >>required by
> >> >> >>>>certain plugins (i.e. this plugin uses an iOS 6 API, so we need
> >>to
> >> >> >>>>update your project to iOS 6). Probably the best approach there
> >>is
> >> >>to
> >> >> >>>>warn/prompt the user before proceeding.
> >> >> >>>>
> >> >> >>>> +1 agree that <resource-file> and <header-file> is redundant.
> >> >>Tooling
> >> >> >>>> should be able to distinguish this so merging with <source-file>
> >> >> >>>>makes a
> >> >> >>>> lot of sense.
> >> >> >>>>
> >> >> >>>> Looking good!
> >> >> >>>>
> >> >> >>>> On 6/8/12 6:40 PM, "Andrew Lunny"
> >> >> >>>><al...@gmail.com>> wrote:
> >> >> >>>>
> >> >> >>>>>Hi all,
> >> >> >>>>>
> >> >> >>>>>I've posted to this list before about pluginstall[1], the tool
> >>I've
> >> >> >>>>>developed as part of working on PhoneGap Build and requiring
> >> >> >>>>>programmatic
> >> >> >>>>>installation of Cordova plugins.
> >> >> >>>>>
> >> >> >>>>>I've now written up a spec for the format that pluginstall uses
> >>- I
> >> >> >>>>>think
> >> >> >>>>>it's generally useful for Cordova plugin installation and
> >> >> >>>>>manipulation.
> >> >> >>>>>The
> >> >> >>>>>spec is available on GitHub:
> >> >> >>>>>https://github.com/alunny/cordova-plugin-spec
> >> >> >>>>>
> >> >> >>>>>Issues and/or pull requests and/or forks welcome.
> >> >> >>>>>
> >> >> >>>>>Cheers,
> >> >> >>>>>Andrew
> >> >> >>>>>
> >> >> >>>>>[1] https://github.com/alunny/pluginstall
> >> >> >>>>
> >> >> >>>>
> >> >> >>
> >> >>
> >> >>
> >>
> >>
>
>

Re: Plugin Format and Spec

Posted by Filip Maj <fi...@adobe.com>.
You don't see any reason why plugins should support different versions of
cordova? Cordova gets released every month. This seems like a pretty
important thing to figure out IMO

On 6/25/12 1:12 PM, "Anis KADRI" <an...@gmail.com> wrote:

>I think we should agree on a spec (plugin package and plugin interface)
>and
>stick to it. As long as we don't break the plugin interface, I don't see
>any reason why plugins should support multiple versions of Cordova. If
>there are any, I'd love to hear them.
>
>On Mon, Jun 25, 2012 at 1:01 PM, Filip Maj <fi...@adobe.com> wrote:
>
>> Back onto the versioning question..
>>
>> 1. Do we want to support different version of the cordova framework in
>> plugins, within a single repo, across versions that changed the
>> native/javascript plugin API?
>> 2. How?
>>
>> If the answer to (1) is yes, one idea for (2) might be nesting another
>> directory level in the all of the source directories that contains the
>> version number supported. For example:
>>
>> src/android/1.5.0/*.java
>> src/android/1.8.1/*.java
>> www/1.5.0/childbrowser.js
>> www/1.8.1/childbrowser.js
>>
>> Could get gnarly real quick though. Another, cleaner implementation in
>> terms of file system "noise" might be to employ a git branches
>> convention.. But that would enforce a git dependency.
>>
>> Just brainstorming / thinking out loud. Both are probably bad ideas :)
>>
>> On 6/25/12 11:41 AM, "Michael Brooks" <mi...@michaelbrooks.ca> wrote:
>>
>> >We may also want to describe testing from JavaScript and Native.
>> >
>> >I would also like to see a repository called "cordova-plugin-template"
>> >that
>> >is a boilerplate to start writing any plugin. The idea is that users
>>start
>> >with something that works, with tests, and documentation boilerplate -
>> >perhaps it can be an echo plugin since that has a minimal footprint.
>> >
>> >On Mon, Jun 25, 2012 at 11:28 AM, Filip Maj <fi...@adobe.com> wrote:
>> >
>> >> Looks great. I'll add some detail to the list you have here. I'd
>> >>recommend
>> >> tweaking the order a little bit; introducing the JS before the native
>> >>APIs.
>> >>
>> >> # Plugin Author Guide
>> >>
>> >> - plugin package format -> points to Andrew's plugin spec
>> >> - js api
>> >> --- basically documenting exec(). Service, action, callbacks,
>>arguments.
>> >> What about how arguments are translated from JS types (string,
>>number,
>> >> objects, etc) to native types for each platform?
>> >>
>> >> - native api
>> >> --- ios
>> >> --- android
>> >> --- blackberry
>> >> --- windowsphone
>> >> --- bada
>> >>
>> >>
>> >> On 6/25/12 11:16 AM, "Brian LeRoux" <b...@brian.io> wrote:
>> >>
>> >> >Biggest question is how to document. My thinking is that we want to
>> >> >specify the PluginPackage so that PluginInstall works. So the docs
>> >> >would read like this:
>> >> >
>> >> ># Plugin Author Guide
>> >> >
>> >> >- plugin package format
>> >> >- native api
>> >> >--- ios
>> >> >--- android
>> >> >--- blackberry
>> >> >--- windowsphone
>> >> >--- bada
>> >> >- js api
>> >> >
>> >> >Thoughts? (If this looks good I will update the issue.)
>> >> >
>> >> >
>> >> >
>> >> >On Mon, Jun 25, 2012 at 10:50 AM, Filip Maj <fi...@adobe.com> wrote:
>> >> >> Hah Michael and I were just talking about that..
>> >> >>
>> >> >> I will send a pull request to Andrew's draft spec
>> >> >>
>> >> >> On 6/25/12 10:46 AM, "Brian LeRoux" <b...@brian.io> wrote:
>> >> >>
>> >> >>>npm does this w/ an 'engines' attribute on package.json
>> >> >>>
>> >> >>>On Mon, Jun 25, 2012 at 10:26 AM, Filip Maj <fi...@adobe.com> wrote:
>> >> >>>> One more thing that came to mind is how to support different
>> >>versions
>> >> >>>>of Cordova? Any ideas?
>> >> >>>>
>> >> >>>> From: Andrew Lunny <al...@gmail.com>>
>> >> >>>> Reply-To: "alunny@gmail.com<ma...@gmail.com>"
>> >> >>>><al...@gmail.com>>
>> >> >>>> To: Default User Nam <fi...@adobe.com>>
>> >> >>>> Cc:
>> >> >>>>"callback-dev@incubator.apache.org<mailto:
>> >> callback-dev@incubator.apache
>> >> >>>>.o
>> >> >>>>rg>"
>> >> >>>><callback-dev@incubator.apache.org<mailto:
>> >> callback-dev@incubator.apache
>> >> >>>>.o
>> >> >>>>rg>>
>> >> >>>> Subject: Re: Plugin Format and Spec
>> >> >>>>
>> >> >>>>
>> >> >>>>
>> >> >>>> On 11 June 2012 13:50, Filip Maj
>> >><fil@adobe.com<mailto:fil@adobe.com
>> >> >>
>> >> >>>>wrote:
>> >> >>>> Nice work Andrew! I suggest taking this and moving to a cordova
>> >>wiki
>> >> >>>>page
>> >> >>>> (assuming all committers are on board to adopting this as the
>>basis
>> >> >>>>for
>> >> >>>>a
>> >> >>>> plugin spec)
>> >> >>>>
>> >> >>>> A link on the Cordova wiki is probably the best place to start
>>- we
>> >> >>>>can
>> >> >>>>get some more feedback from plugin authors and app developers
>>(i.e.
>> >> >>>>keep
>> >> >>>>this as "a way to write plugins" rather than "the official way to
>> >>write
>> >> >>>>plugins").
>> >> >>>>
>> >> >>>>
>> >> >>>> Is target-dir necessary for the <source-file> element? For Java
>> >>files,
>> >> >>>>the
>> >> >>>> tooling could take a peak inside the .java file and extract out
>>the
>> >> >>>> package name from the file, no? Phonegap build already does this
>> >> >>>>doesn't
>> >> >>>> it?
>> >> >>>>
>> >> >>>> PhoneGap Build did do this, but no longer supports uploading
>> >>arbitrary
>> >> >>>>Java files. Only plugins with a manifest are supported.
>> >> >>>>
>> >> >>>> I'm torn - one of the goals of this format is to make it as
>>easy as
>> >> >>>>possible to write tools that use it as possible. Right now, a
>>tool
>> >> >>>>reads
>> >> >>>>one file (plugin.xml) and moves source files (ignoring config
>>files
>> >>for
>> >> >>>>the moment). I'd prefer it wasn't "read one file, then read each
>> >>.java
>> >> >>>>file to discover where to move it".
>> >> >>>>
>> >> >>>> One option is to use the id attribute on the top-level plugin
>> >>element
>> >> >>>>to resolve the path, but that doesn't handle the case where
>> >>different
>> >> >>>>Java files will have different paths. I wonder if there are more
>> >> >>>>complex
>> >> >>>>plugins around we can try to convert to see where the pain points
>> >>are.
>> >> >>>>
>> >> >>>>
>> >> >>>> Adding the ability to modify existing parts of a native
>>platform's
>> >> >>>>config
>> >> >>>> document to the <config-file> portion might be needed.. Although
>> >>Ive
>> >> >>>>yet
>> >> >>>> to dig up a use case. Will dig around more.
>> >> >>>>
>> >> >>>> Agreed - also things like target OS/SDK versions may be
>>required by
>> >> >>>>certain plugins (i.e. this plugin uses an iOS 6 API, so we need
>>to
>> >> >>>>update your project to iOS 6). Probably the best approach there
>>is
>> >>to
>> >> >>>>warn/prompt the user before proceeding.
>> >> >>>>
>> >> >>>> +1 agree that <resource-file> and <header-file> is redundant.
>> >>Tooling
>> >> >>>> should be able to distinguish this so merging with <source-file>
>> >> >>>>makes a
>> >> >>>> lot of sense.
>> >> >>>>
>> >> >>>> Looking good!
>> >> >>>>
>> >> >>>> On 6/8/12 6:40 PM, "Andrew Lunny"
>> >> >>>><al...@gmail.com>> wrote:
>> >> >>>>
>> >> >>>>>Hi all,
>> >> >>>>>
>> >> >>>>>I've posted to this list before about pluginstall[1], the tool
>>I've
>> >> >>>>>developed as part of working on PhoneGap Build and requiring
>> >> >>>>>programmatic
>> >> >>>>>installation of Cordova plugins.
>> >> >>>>>
>> >> >>>>>I've now written up a spec for the format that pluginstall uses
>>- I
>> >> >>>>>think
>> >> >>>>>it's generally useful for Cordova plugin installation and
>> >> >>>>>manipulation.
>> >> >>>>>The
>> >> >>>>>spec is available on GitHub:
>> >> >>>>>https://github.com/alunny/cordova-plugin-spec
>> >> >>>>>
>> >> >>>>>Issues and/or pull requests and/or forks welcome.
>> >> >>>>>
>> >> >>>>>Cheers,
>> >> >>>>>Andrew
>> >> >>>>>
>> >> >>>>>[1] https://github.com/alunny/pluginstall
>> >> >>>>
>> >> >>>>
>> >> >>
>> >>
>> >>
>>
>>


Re: Plugin Format and Spec

Posted by Anis KADRI <an...@gmail.com>.
I think we should agree on a spec (plugin package and plugin interface) and
stick to it. As long as we don't break the plugin interface, I don't see
any reason why plugins should support multiple versions of Cordova. If
there are any, I'd love to hear them.

On Mon, Jun 25, 2012 at 1:01 PM, Filip Maj <fi...@adobe.com> wrote:

> Back onto the versioning question..
>
> 1. Do we want to support different version of the cordova framework in
> plugins, within a single repo, across versions that changed the
> native/javascript plugin API?
> 2. How?
>
> If the answer to (1) is yes, one idea for (2) might be nesting another
> directory level in the all of the source directories that contains the
> version number supported. For example:
>
> src/android/1.5.0/*.java
> src/android/1.8.1/*.java
> www/1.5.0/childbrowser.js
> www/1.8.1/childbrowser.js
>
> Could get gnarly real quick though. Another, cleaner implementation in
> terms of file system "noise" might be to employ a git branches
> convention.. But that would enforce a git dependency.
>
> Just brainstorming / thinking out loud. Both are probably bad ideas :)
>
> On 6/25/12 11:41 AM, "Michael Brooks" <mi...@michaelbrooks.ca> wrote:
>
> >We may also want to describe testing from JavaScript and Native.
> >
> >I would also like to see a repository called "cordova-plugin-template"
> >that
> >is a boilerplate to start writing any plugin. The idea is that users start
> >with something that works, with tests, and documentation boilerplate -
> >perhaps it can be an echo plugin since that has a minimal footprint.
> >
> >On Mon, Jun 25, 2012 at 11:28 AM, Filip Maj <fi...@adobe.com> wrote:
> >
> >> Looks great. I'll add some detail to the list you have here. I'd
> >>recommend
> >> tweaking the order a little bit; introducing the JS before the native
> >>APIs.
> >>
> >> # Plugin Author Guide
> >>
> >> - plugin package format -> points to Andrew's plugin spec
> >> - js api
> >> --- basically documenting exec(). Service, action, callbacks, arguments.
> >> What about how arguments are translated from JS types (string, number,
> >> objects, etc) to native types for each platform?
> >>
> >> - native api
> >> --- ios
> >> --- android
> >> --- blackberry
> >> --- windowsphone
> >> --- bada
> >>
> >>
> >> On 6/25/12 11:16 AM, "Brian LeRoux" <b...@brian.io> wrote:
> >>
> >> >Biggest question is how to document. My thinking is that we want to
> >> >specify the PluginPackage so that PluginInstall works. So the docs
> >> >would read like this:
> >> >
> >> ># Plugin Author Guide
> >> >
> >> >- plugin package format
> >> >- native api
> >> >--- ios
> >> >--- android
> >> >--- blackberry
> >> >--- windowsphone
> >> >--- bada
> >> >- js api
> >> >
> >> >Thoughts? (If this looks good I will update the issue.)
> >> >
> >> >
> >> >
> >> >On Mon, Jun 25, 2012 at 10:50 AM, Filip Maj <fi...@adobe.com> wrote:
> >> >> Hah Michael and I were just talking about that..
> >> >>
> >> >> I will send a pull request to Andrew's draft spec
> >> >>
> >> >> On 6/25/12 10:46 AM, "Brian LeRoux" <b...@brian.io> wrote:
> >> >>
> >> >>>npm does this w/ an 'engines' attribute on package.json
> >> >>>
> >> >>>On Mon, Jun 25, 2012 at 10:26 AM, Filip Maj <fi...@adobe.com> wrote:
> >> >>>> One more thing that came to mind is how to support different
> >>versions
> >> >>>>of Cordova? Any ideas?
> >> >>>>
> >> >>>> From: Andrew Lunny <al...@gmail.com>>
> >> >>>> Reply-To: "alunny@gmail.com<ma...@gmail.com>"
> >> >>>><al...@gmail.com>>
> >> >>>> To: Default User Nam <fi...@adobe.com>>
> >> >>>> Cc:
> >> >>>>"callback-dev@incubator.apache.org<mailto:
> >> callback-dev@incubator.apache
> >> >>>>.o
> >> >>>>rg>"
> >> >>>><callback-dev@incubator.apache.org<mailto:
> >> callback-dev@incubator.apache
> >> >>>>.o
> >> >>>>rg>>
> >> >>>> Subject: Re: Plugin Format and Spec
> >> >>>>
> >> >>>>
> >> >>>>
> >> >>>> On 11 June 2012 13:50, Filip Maj
> >><fil@adobe.com<mailto:fil@adobe.com
> >> >>
> >> >>>>wrote:
> >> >>>> Nice work Andrew! I suggest taking this and moving to a cordova
> >>wiki
> >> >>>>page
> >> >>>> (assuming all committers are on board to adopting this as the basis
> >> >>>>for
> >> >>>>a
> >> >>>> plugin spec)
> >> >>>>
> >> >>>> A link on the Cordova wiki is probably the best place to start - we
> >> >>>>can
> >> >>>>get some more feedback from plugin authors and app developers (i.e.
> >> >>>>keep
> >> >>>>this as "a way to write plugins" rather than "the official way to
> >>write
> >> >>>>plugins").
> >> >>>>
> >> >>>>
> >> >>>> Is target-dir necessary for the <source-file> element? For Java
> >>files,
> >> >>>>the
> >> >>>> tooling could take a peak inside the .java file and extract out the
> >> >>>> package name from the file, no? Phonegap build already does this
> >> >>>>doesn't
> >> >>>> it?
> >> >>>>
> >> >>>> PhoneGap Build did do this, but no longer supports uploading
> >>arbitrary
> >> >>>>Java files. Only plugins with a manifest are supported.
> >> >>>>
> >> >>>> I'm torn - one of the goals of this format is to make it as easy as
> >> >>>>possible to write tools that use it as possible. Right now, a tool
> >> >>>>reads
> >> >>>>one file (plugin.xml) and moves source files (ignoring config files
> >>for
> >> >>>>the moment). I'd prefer it wasn't "read one file, then read each
> >>.java
> >> >>>>file to discover where to move it".
> >> >>>>
> >> >>>> One option is to use the id attribute on the top-level plugin
> >>element
> >> >>>>to resolve the path, but that doesn't handle the case where
> >>different
> >> >>>>Java files will have different paths. I wonder if there are more
> >> >>>>complex
> >> >>>>plugins around we can try to convert to see where the pain points
> >>are.
> >> >>>>
> >> >>>>
> >> >>>> Adding the ability to modify existing parts of a native platform's
> >> >>>>config
> >> >>>> document to the <config-file> portion might be needed.. Although
> >>Ive
> >> >>>>yet
> >> >>>> to dig up a use case. Will dig around more.
> >> >>>>
> >> >>>> Agreed - also things like target OS/SDK versions may be required by
> >> >>>>certain plugins (i.e. this plugin uses an iOS 6 API, so we need to
> >> >>>>update your project to iOS 6). Probably the best approach there is
> >>to
> >> >>>>warn/prompt the user before proceeding.
> >> >>>>
> >> >>>> +1 agree that <resource-file> and <header-file> is redundant.
> >>Tooling
> >> >>>> should be able to distinguish this so merging with <source-file>
> >> >>>>makes a
> >> >>>> lot of sense.
> >> >>>>
> >> >>>> Looking good!
> >> >>>>
> >> >>>> On 6/8/12 6:40 PM, "Andrew Lunny"
> >> >>>><al...@gmail.com>> wrote:
> >> >>>>
> >> >>>>>Hi all,
> >> >>>>>
> >> >>>>>I've posted to this list before about pluginstall[1], the tool I've
> >> >>>>>developed as part of working on PhoneGap Build and requiring
> >> >>>>>programmatic
> >> >>>>>installation of Cordova plugins.
> >> >>>>>
> >> >>>>>I've now written up a spec for the format that pluginstall uses - I
> >> >>>>>think
> >> >>>>>it's generally useful for Cordova plugin installation and
> >> >>>>>manipulation.
> >> >>>>>The
> >> >>>>>spec is available on GitHub:
> >> >>>>>https://github.com/alunny/cordova-plugin-spec
> >> >>>>>
> >> >>>>>Issues and/or pull requests and/or forks welcome.
> >> >>>>>
> >> >>>>>Cheers,
> >> >>>>>Andrew
> >> >>>>>
> >> >>>>>[1] https://github.com/alunny/pluginstall
> >> >>>>
> >> >>>>
> >> >>
> >>
> >>
>
>

Re: Plugin Format and Spec

Posted by Filip Maj <fi...@adobe.com>.
Back onto the versioning question..

1. Do we want to support different version of the cordova framework in
plugins, within a single repo, across versions that changed the
native/javascript plugin API?
2. How?

If the answer to (1) is yes, one idea for (2) might be nesting another
directory level in the all of the source directories that contains the
version number supported. For example:

src/android/1.5.0/*.java
src/android/1.8.1/*.java
www/1.5.0/childbrowser.js
www/1.8.1/childbrowser.js

Could get gnarly real quick though. Another, cleaner implementation in
terms of file system "noise" might be to employ a git branches
convention.. But that would enforce a git dependency.

Just brainstorming / thinking out loud. Both are probably bad ideas :)

On 6/25/12 11:41 AM, "Michael Brooks" <mi...@michaelbrooks.ca> wrote:

>We may also want to describe testing from JavaScript and Native.
>
>I would also like to see a repository called "cordova-plugin-template"
>that
>is a boilerplate to start writing any plugin. The idea is that users start
>with something that works, with tests, and documentation boilerplate -
>perhaps it can be an echo plugin since that has a minimal footprint.
>
>On Mon, Jun 25, 2012 at 11:28 AM, Filip Maj <fi...@adobe.com> wrote:
>
>> Looks great. I'll add some detail to the list you have here. I'd
>>recommend
>> tweaking the order a little bit; introducing the JS before the native
>>APIs.
>>
>> # Plugin Author Guide
>>
>> - plugin package format -> points to Andrew's plugin spec
>> - js api
>> --- basically documenting exec(). Service, action, callbacks, arguments.
>> What about how arguments are translated from JS types (string, number,
>> objects, etc) to native types for each platform?
>>
>> - native api
>> --- ios
>> --- android
>> --- blackberry
>> --- windowsphone
>> --- bada
>>
>>
>> On 6/25/12 11:16 AM, "Brian LeRoux" <b...@brian.io> wrote:
>>
>> >Biggest question is how to document. My thinking is that we want to
>> >specify the PluginPackage so that PluginInstall works. So the docs
>> >would read like this:
>> >
>> ># Plugin Author Guide
>> >
>> >- plugin package format
>> >- native api
>> >--- ios
>> >--- android
>> >--- blackberry
>> >--- windowsphone
>> >--- bada
>> >- js api
>> >
>> >Thoughts? (If this looks good I will update the issue.)
>> >
>> >
>> >
>> >On Mon, Jun 25, 2012 at 10:50 AM, Filip Maj <fi...@adobe.com> wrote:
>> >> Hah Michael and I were just talking about that..
>> >>
>> >> I will send a pull request to Andrew's draft spec
>> >>
>> >> On 6/25/12 10:46 AM, "Brian LeRoux" <b...@brian.io> wrote:
>> >>
>> >>>npm does this w/ an 'engines' attribute on package.json
>> >>>
>> >>>On Mon, Jun 25, 2012 at 10:26 AM, Filip Maj <fi...@adobe.com> wrote:
>> >>>> One more thing that came to mind is how to support different
>>versions
>> >>>>of Cordova? Any ideas?
>> >>>>
>> >>>> From: Andrew Lunny <al...@gmail.com>>
>> >>>> Reply-To: "alunny@gmail.com<ma...@gmail.com>"
>> >>>><al...@gmail.com>>
>> >>>> To: Default User Nam <fi...@adobe.com>>
>> >>>> Cc:
>> >>>>"callback-dev@incubator.apache.org<mailto:
>> callback-dev@incubator.apache
>> >>>>.o
>> >>>>rg>"
>> >>>><callback-dev@incubator.apache.org<mailto:
>> callback-dev@incubator.apache
>> >>>>.o
>> >>>>rg>>
>> >>>> Subject: Re: Plugin Format and Spec
>> >>>>
>> >>>>
>> >>>>
>> >>>> On 11 June 2012 13:50, Filip Maj
>><fil@adobe.com<mailto:fil@adobe.com
>> >>
>> >>>>wrote:
>> >>>> Nice work Andrew! I suggest taking this and moving to a cordova
>>wiki
>> >>>>page
>> >>>> (assuming all committers are on board to adopting this as the basis
>> >>>>for
>> >>>>a
>> >>>> plugin spec)
>> >>>>
>> >>>> A link on the Cordova wiki is probably the best place to start - we
>> >>>>can
>> >>>>get some more feedback from plugin authors and app developers (i.e.
>> >>>>keep
>> >>>>this as "a way to write plugins" rather than "the official way to
>>write
>> >>>>plugins").
>> >>>>
>> >>>>
>> >>>> Is target-dir necessary for the <source-file> element? For Java
>>files,
>> >>>>the
>> >>>> tooling could take a peak inside the .java file and extract out the
>> >>>> package name from the file, no? Phonegap build already does this
>> >>>>doesn't
>> >>>> it?
>> >>>>
>> >>>> PhoneGap Build did do this, but no longer supports uploading
>>arbitrary
>> >>>>Java files. Only plugins with a manifest are supported.
>> >>>>
>> >>>> I'm torn - one of the goals of this format is to make it as easy as
>> >>>>possible to write tools that use it as possible. Right now, a tool
>> >>>>reads
>> >>>>one file (plugin.xml) and moves source files (ignoring config files
>>for
>> >>>>the moment). I'd prefer it wasn't "read one file, then read each
>>.java
>> >>>>file to discover where to move it".
>> >>>>
>> >>>> One option is to use the id attribute on the top-level plugin
>>element
>> >>>>to resolve the path, but that doesn't handle the case where
>>different
>> >>>>Java files will have different paths. I wonder if there are more
>> >>>>complex
>> >>>>plugins around we can try to convert to see where the pain points
>>are.
>> >>>>
>> >>>>
>> >>>> Adding the ability to modify existing parts of a native platform's
>> >>>>config
>> >>>> document to the <config-file> portion might be needed.. Although
>>Ive
>> >>>>yet
>> >>>> to dig up a use case. Will dig around more.
>> >>>>
>> >>>> Agreed - also things like target OS/SDK versions may be required by
>> >>>>certain plugins (i.e. this plugin uses an iOS 6 API, so we need to
>> >>>>update your project to iOS 6). Probably the best approach there is
>>to
>> >>>>warn/prompt the user before proceeding.
>> >>>>
>> >>>> +1 agree that <resource-file> and <header-file> is redundant.
>>Tooling
>> >>>> should be able to distinguish this so merging with <source-file>
>> >>>>makes a
>> >>>> lot of sense.
>> >>>>
>> >>>> Looking good!
>> >>>>
>> >>>> On 6/8/12 6:40 PM, "Andrew Lunny"
>> >>>><al...@gmail.com>> wrote:
>> >>>>
>> >>>>>Hi all,
>> >>>>>
>> >>>>>I've posted to this list before about pluginstall[1], the tool I've
>> >>>>>developed as part of working on PhoneGap Build and requiring
>> >>>>>programmatic
>> >>>>>installation of Cordova plugins.
>> >>>>>
>> >>>>>I've now written up a spec for the format that pluginstall uses - I
>> >>>>>think
>> >>>>>it's generally useful for Cordova plugin installation and
>> >>>>>manipulation.
>> >>>>>The
>> >>>>>spec is available on GitHub:
>> >>>>>https://github.com/alunny/cordova-plugin-spec
>> >>>>>
>> >>>>>Issues and/or pull requests and/or forks welcome.
>> >>>>>
>> >>>>>Cheers,
>> >>>>>Andrew
>> >>>>>
>> >>>>>[1] https://github.com/alunny/pluginstall
>> >>>>
>> >>>>
>> >>
>>
>>


Re: Plugin Format and Spec

Posted by Michael Brooks <mi...@michaelbrooks.ca>.
We may also want to describe testing from JavaScript and Native.

I would also like to see a repository called "cordova-plugin-template" that
is a boilerplate to start writing any plugin. The idea is that users start
with something that works, with tests, and documentation boilerplate -
perhaps it can be an echo plugin since that has a minimal footprint.

On Mon, Jun 25, 2012 at 11:28 AM, Filip Maj <fi...@adobe.com> wrote:

> Looks great. I'll add some detail to the list you have here. I'd recommend
> tweaking the order a little bit; introducing the JS before the native APIs.
>
> # Plugin Author Guide
>
> - plugin package format -> points to Andrew's plugin spec
> - js api
> --- basically documenting exec(). Service, action, callbacks, arguments.
> What about how arguments are translated from JS types (string, number,
> objects, etc) to native types for each platform?
>
> - native api
> --- ios
> --- android
> --- blackberry
> --- windowsphone
> --- bada
>
>
> On 6/25/12 11:16 AM, "Brian LeRoux" <b...@brian.io> wrote:
>
> >Biggest question is how to document. My thinking is that we want to
> >specify the PluginPackage so that PluginInstall works. So the docs
> >would read like this:
> >
> ># Plugin Author Guide
> >
> >- plugin package format
> >- native api
> >--- ios
> >--- android
> >--- blackberry
> >--- windowsphone
> >--- bada
> >- js api
> >
> >Thoughts? (If this looks good I will update the issue.)
> >
> >
> >
> >On Mon, Jun 25, 2012 at 10:50 AM, Filip Maj <fi...@adobe.com> wrote:
> >> Hah Michael and I were just talking about that..
> >>
> >> I will send a pull request to Andrew's draft spec
> >>
> >> On 6/25/12 10:46 AM, "Brian LeRoux" <b...@brian.io> wrote:
> >>
> >>>npm does this w/ an 'engines' attribute on package.json
> >>>
> >>>On Mon, Jun 25, 2012 at 10:26 AM, Filip Maj <fi...@adobe.com> wrote:
> >>>> One more thing that came to mind is how to support different versions
> >>>>of Cordova? Any ideas?
> >>>>
> >>>> From: Andrew Lunny <al...@gmail.com>>
> >>>> Reply-To: "alunny@gmail.com<ma...@gmail.com>"
> >>>><al...@gmail.com>>
> >>>> To: Default User Nam <fi...@adobe.com>>
> >>>> Cc:
> >>>>"callback-dev@incubator.apache.org<mailto:
> callback-dev@incubator.apache
> >>>>.o
> >>>>rg>"
> >>>><callback-dev@incubator.apache.org<mailto:
> callback-dev@incubator.apache
> >>>>.o
> >>>>rg>>
> >>>> Subject: Re: Plugin Format and Spec
> >>>>
> >>>>
> >>>>
> >>>> On 11 June 2012 13:50, Filip Maj <fil@adobe.com<mailto:fil@adobe.com
> >>
> >>>>wrote:
> >>>> Nice work Andrew! I suggest taking this and moving to a cordova wiki
> >>>>page
> >>>> (assuming all committers are on board to adopting this as the basis
> >>>>for
> >>>>a
> >>>> plugin spec)
> >>>>
> >>>> A link on the Cordova wiki is probably the best place to start - we
> >>>>can
> >>>>get some more feedback from plugin authors and app developers (i.e.
> >>>>keep
> >>>>this as "a way to write plugins" rather than "the official way to write
> >>>>plugins").
> >>>>
> >>>>
> >>>> Is target-dir necessary for the <source-file> element? For Java files,
> >>>>the
> >>>> tooling could take a peak inside the .java file and extract out the
> >>>> package name from the file, no? Phonegap build already does this
> >>>>doesn't
> >>>> it?
> >>>>
> >>>> PhoneGap Build did do this, but no longer supports uploading arbitrary
> >>>>Java files. Only plugins with a manifest are supported.
> >>>>
> >>>> I'm torn - one of the goals of this format is to make it as easy as
> >>>>possible to write tools that use it as possible. Right now, a tool
> >>>>reads
> >>>>one file (plugin.xml) and moves source files (ignoring config files for
> >>>>the moment). I'd prefer it wasn't "read one file, then read each .java
> >>>>file to discover where to move it".
> >>>>
> >>>> One option is to use the id attribute on the top-level plugin element
> >>>>to resolve the path, but that doesn't handle the case where different
> >>>>Java files will have different paths. I wonder if there are more
> >>>>complex
> >>>>plugins around we can try to convert to see where the pain points are.
> >>>>
> >>>>
> >>>> Adding the ability to modify existing parts of a native platform's
> >>>>config
> >>>> document to the <config-file> portion might be needed.. Although Ive
> >>>>yet
> >>>> to dig up a use case. Will dig around more.
> >>>>
> >>>> Agreed - also things like target OS/SDK versions may be required by
> >>>>certain plugins (i.e. this plugin uses an iOS 6 API, so we need to
> >>>>update your project to iOS 6). Probably the best approach there is to
> >>>>warn/prompt the user before proceeding.
> >>>>
> >>>> +1 agree that <resource-file> and <header-file> is redundant. Tooling
> >>>> should be able to distinguish this so merging with <source-file>
> >>>>makes a
> >>>> lot of sense.
> >>>>
> >>>> Looking good!
> >>>>
> >>>> On 6/8/12 6:40 PM, "Andrew Lunny"
> >>>><al...@gmail.com>> wrote:
> >>>>
> >>>>>Hi all,
> >>>>>
> >>>>>I've posted to this list before about pluginstall[1], the tool I've
> >>>>>developed as part of working on PhoneGap Build and requiring
> >>>>>programmatic
> >>>>>installation of Cordova plugins.
> >>>>>
> >>>>>I've now written up a spec for the format that pluginstall uses - I
> >>>>>think
> >>>>>it's generally useful for Cordova plugin installation and
> >>>>>manipulation.
> >>>>>The
> >>>>>spec is available on GitHub:
> >>>>>https://github.com/alunny/cordova-plugin-spec
> >>>>>
> >>>>>Issues and/or pull requests and/or forks welcome.
> >>>>>
> >>>>>Cheers,
> >>>>>Andrew
> >>>>>
> >>>>>[1] https://github.com/alunny/pluginstall
> >>>>
> >>>>
> >>
>
>

Re: Plugin Format and Spec

Posted by Filip Maj <fi...@adobe.com>.
Looks great. I'll add some detail to the list you have here. I'd recommend
tweaking the order a little bit; introducing the JS before the native APIs.

# Plugin Author Guide

- plugin package format -> points to Andrew's plugin spec
- js api
--- basically documenting exec(). Service, action, callbacks, arguments.
What about how arguments are translated from JS types (string, number,
objects, etc) to native types for each platform?

- native api
--- ios
--- android
--- blackberry
--- windowsphone
--- bada


On 6/25/12 11:16 AM, "Brian LeRoux" <b...@brian.io> wrote:

>Biggest question is how to document. My thinking is that we want to
>specify the PluginPackage so that PluginInstall works. So the docs
>would read like this:
>
># Plugin Author Guide
>
>- plugin package format
>- native api
>--- ios
>--- android
>--- blackberry
>--- windowsphone
>--- bada
>- js api
>
>Thoughts? (If this looks good I will update the issue.)
>
>
>
>On Mon, Jun 25, 2012 at 10:50 AM, Filip Maj <fi...@adobe.com> wrote:
>> Hah Michael and I were just talking about that..
>>
>> I will send a pull request to Andrew's draft spec
>>
>> On 6/25/12 10:46 AM, "Brian LeRoux" <b...@brian.io> wrote:
>>
>>>npm does this w/ an 'engines' attribute on package.json
>>>
>>>On Mon, Jun 25, 2012 at 10:26 AM, Filip Maj <fi...@adobe.com> wrote:
>>>> One more thing that came to mind is how to support different versions
>>>>of Cordova? Any ideas?
>>>>
>>>> From: Andrew Lunny <al...@gmail.com>>
>>>> Reply-To: "alunny@gmail.com<ma...@gmail.com>"
>>>><al...@gmail.com>>
>>>> To: Default User Nam <fi...@adobe.com>>
>>>> Cc:
>>>>"callback-dev@incubator.apache.org<mailto:callback-dev@incubator.apache
>>>>.o
>>>>rg>"
>>>><callback-dev@incubator.apache.org<mailto:callback-dev@incubator.apache
>>>>.o
>>>>rg>>
>>>> Subject: Re: Plugin Format and Spec
>>>>
>>>>
>>>>
>>>> On 11 June 2012 13:50, Filip Maj <fi...@adobe.com>>
>>>>wrote:
>>>> Nice work Andrew! I suggest taking this and moving to a cordova wiki
>>>>page
>>>> (assuming all committers are on board to adopting this as the basis
>>>>for
>>>>a
>>>> plugin spec)
>>>>
>>>> A link on the Cordova wiki is probably the best place to start - we
>>>>can
>>>>get some more feedback from plugin authors and app developers (i.e.
>>>>keep
>>>>this as "a way to write plugins" rather than "the official way to write
>>>>plugins").
>>>>
>>>>
>>>> Is target-dir necessary for the <source-file> element? For Java files,
>>>>the
>>>> tooling could take a peak inside the .java file and extract out the
>>>> package name from the file, no? Phonegap build already does this
>>>>doesn't
>>>> it?
>>>>
>>>> PhoneGap Build did do this, but no longer supports uploading arbitrary
>>>>Java files. Only plugins with a manifest are supported.
>>>>
>>>> I'm torn - one of the goals of this format is to make it as easy as
>>>>possible to write tools that use it as possible. Right now, a tool
>>>>reads
>>>>one file (plugin.xml) and moves source files (ignoring config files for
>>>>the moment). I'd prefer it wasn't "read one file, then read each .java
>>>>file to discover where to move it".
>>>>
>>>> One option is to use the id attribute on the top-level plugin element
>>>>to resolve the path, but that doesn't handle the case where different
>>>>Java files will have different paths. I wonder if there are more
>>>>complex
>>>>plugins around we can try to convert to see where the pain points are.
>>>>
>>>>
>>>> Adding the ability to modify existing parts of a native platform's
>>>>config
>>>> document to the <config-file> portion might be needed.. Although Ive
>>>>yet
>>>> to dig up a use case. Will dig around more.
>>>>
>>>> Agreed - also things like target OS/SDK versions may be required by
>>>>certain plugins (i.e. this plugin uses an iOS 6 API, so we need to
>>>>update your project to iOS 6). Probably the best approach there is to
>>>>warn/prompt the user before proceeding.
>>>>
>>>> +1 agree that <resource-file> and <header-file> is redundant. Tooling
>>>> should be able to distinguish this so merging with <source-file>
>>>>makes a
>>>> lot of sense.
>>>>
>>>> Looking good!
>>>>
>>>> On 6/8/12 6:40 PM, "Andrew Lunny"
>>>><al...@gmail.com>> wrote:
>>>>
>>>>>Hi all,
>>>>>
>>>>>I've posted to this list before about pluginstall[1], the tool I've
>>>>>developed as part of working on PhoneGap Build and requiring
>>>>>programmatic
>>>>>installation of Cordova plugins.
>>>>>
>>>>>I've now written up a spec for the format that pluginstall uses - I
>>>>>think
>>>>>it's generally useful for Cordova plugin installation and
>>>>>manipulation.
>>>>>The
>>>>>spec is available on GitHub:
>>>>>https://github.com/alunny/cordova-plugin-spec
>>>>>
>>>>>Issues and/or pull requests and/or forks welcome.
>>>>>
>>>>>Cheers,
>>>>>Andrew
>>>>>
>>>>>[1] https://github.com/alunny/pluginstall
>>>>
>>>>
>>


Re: Plugin Format and Spec

Posted by Brian LeRoux <b...@brian.io>.
Biggest question is how to document. My thinking is that we want to
specify the PluginPackage so that PluginInstall works. So the docs
would read like this:

# Plugin Author Guide

- plugin package format
- native api
--- ios
--- android
--- blackberry
--- windowsphone
--- bada
- js api

Thoughts? (If this looks good I will update the issue.)



On Mon, Jun 25, 2012 at 10:50 AM, Filip Maj <fi...@adobe.com> wrote:
> Hah Michael and I were just talking about that..
>
> I will send a pull request to Andrew's draft spec
>
> On 6/25/12 10:46 AM, "Brian LeRoux" <b...@brian.io> wrote:
>
>>npm does this w/ an 'engines' attribute on package.json
>>
>>On Mon, Jun 25, 2012 at 10:26 AM, Filip Maj <fi...@adobe.com> wrote:
>>> One more thing that came to mind is how to support different versions
>>>of Cordova? Any ideas?
>>>
>>> From: Andrew Lunny <al...@gmail.com>>
>>> Reply-To: "alunny@gmail.com<ma...@gmail.com>"
>>><al...@gmail.com>>
>>> To: Default User Nam <fi...@adobe.com>>
>>> Cc:
>>>"callback-dev@incubator.apache.org<mailto:callback-dev@incubator.apache.o
>>>rg>"
>>><callback-dev@incubator.apache.org<mailto:callback-dev@incubator.apache.o
>>>rg>>
>>> Subject: Re: Plugin Format and Spec
>>>
>>>
>>>
>>> On 11 June 2012 13:50, Filip Maj <fi...@adobe.com>>
>>>wrote:
>>> Nice work Andrew! I suggest taking this and moving to a cordova wiki
>>>page
>>> (assuming all committers are on board to adopting this as the basis for
>>>a
>>> plugin spec)
>>>
>>> A link on the Cordova wiki is probably the best place to start - we can
>>>get some more feedback from plugin authors and app developers (i.e. keep
>>>this as "a way to write plugins" rather than "the official way to write
>>>plugins").
>>>
>>>
>>> Is target-dir necessary for the <source-file> element? For Java files,
>>>the
>>> tooling could take a peak inside the .java file and extract out the
>>> package name from the file, no? Phonegap build already does this doesn't
>>> it?
>>>
>>> PhoneGap Build did do this, but no longer supports uploading arbitrary
>>>Java files. Only plugins with a manifest are supported.
>>>
>>> I'm torn - one of the goals of this format is to make it as easy as
>>>possible to write tools that use it as possible. Right now, a tool reads
>>>one file (plugin.xml) and moves source files (ignoring config files for
>>>the moment). I'd prefer it wasn't "read one file, then read each .java
>>>file to discover where to move it".
>>>
>>> One option is to use the id attribute on the top-level plugin element
>>>to resolve the path, but that doesn't handle the case where different
>>>Java files will have different paths. I wonder if there are more complex
>>>plugins around we can try to convert to see where the pain points are.
>>>
>>>
>>> Adding the ability to modify existing parts of a native platform's
>>>config
>>> document to the <config-file> portion might be needed.. Although Ive yet
>>> to dig up a use case. Will dig around more.
>>>
>>> Agreed - also things like target OS/SDK versions may be required by
>>>certain plugins (i.e. this plugin uses an iOS 6 API, so we need to
>>>update your project to iOS 6). Probably the best approach there is to
>>>warn/prompt the user before proceeding.
>>>
>>> +1 agree that <resource-file> and <header-file> is redundant. Tooling
>>> should be able to distinguish this so merging with <source-file> makes a
>>> lot of sense.
>>>
>>> Looking good!
>>>
>>> On 6/8/12 6:40 PM, "Andrew Lunny"
>>><al...@gmail.com>> wrote:
>>>
>>>>Hi all,
>>>>
>>>>I've posted to this list before about pluginstall[1], the tool I've
>>>>developed as part of working on PhoneGap Build and requiring
>>>>programmatic
>>>>installation of Cordova plugins.
>>>>
>>>>I've now written up a spec for the format that pluginstall uses - I
>>>>think
>>>>it's generally useful for Cordova plugin installation and manipulation.
>>>>The
>>>>spec is available on GitHub:
>>>>https://github.com/alunny/cordova-plugin-spec
>>>>
>>>>Issues and/or pull requests and/or forks welcome.
>>>>
>>>>Cheers,
>>>>Andrew
>>>>
>>>>[1] https://github.com/alunny/pluginstall
>>>
>>>
>

Re: Plugin Format and Spec

Posted by Filip Maj <fi...@adobe.com>.
Hah Michael and I were just talking about that..

I will send a pull request to Andrew's draft spec

On 6/25/12 10:46 AM, "Brian LeRoux" <b...@brian.io> wrote:

>npm does this w/ an 'engines' attribute on package.json
>
>On Mon, Jun 25, 2012 at 10:26 AM, Filip Maj <fi...@adobe.com> wrote:
>> One more thing that came to mind is how to support different versions
>>of Cordova? Any ideas?
>>
>> From: Andrew Lunny <al...@gmail.com>>
>> Reply-To: "alunny@gmail.com<ma...@gmail.com>"
>><al...@gmail.com>>
>> To: Default User Nam <fi...@adobe.com>>
>> Cc: 
>>"callback-dev@incubator.apache.org<mailto:callback-dev@incubator.apache.o
>>rg>" 
>><callback-dev@incubator.apache.org<mailto:callback-dev@incubator.apache.o
>>rg>>
>> Subject: Re: Plugin Format and Spec
>>
>>
>>
>> On 11 June 2012 13:50, Filip Maj <fi...@adobe.com>>
>>wrote:
>> Nice work Andrew! I suggest taking this and moving to a cordova wiki
>>page
>> (assuming all committers are on board to adopting this as the basis for
>>a
>> plugin spec)
>>
>> A link on the Cordova wiki is probably the best place to start - we can
>>get some more feedback from plugin authors and app developers (i.e. keep
>>this as "a way to write plugins" rather than "the official way to write
>>plugins").
>>
>>
>> Is target-dir necessary for the <source-file> element? For Java files,
>>the
>> tooling could take a peak inside the .java file and extract out the
>> package name from the file, no? Phonegap build already does this doesn't
>> it?
>>
>> PhoneGap Build did do this, but no longer supports uploading arbitrary
>>Java files. Only plugins with a manifest are supported.
>>
>> I'm torn - one of the goals of this format is to make it as easy as
>>possible to write tools that use it as possible. Right now, a tool reads
>>one file (plugin.xml) and moves source files (ignoring config files for
>>the moment). I'd prefer it wasn't "read one file, then read each .java
>>file to discover where to move it".
>>
>> One option is to use the id attribute on the top-level plugin element
>>to resolve the path, but that doesn't handle the case where different
>>Java files will have different paths. I wonder if there are more complex
>>plugins around we can try to convert to see where the pain points are.
>>
>>
>> Adding the ability to modify existing parts of a native platform's
>>config
>> document to the <config-file> portion might be needed.. Although Ive yet
>> to dig up a use case. Will dig around more.
>>
>> Agreed - also things like target OS/SDK versions may be required by
>>certain plugins (i.e. this plugin uses an iOS 6 API, so we need to
>>update your project to iOS 6). Probably the best approach there is to
>>warn/prompt the user before proceeding.
>>
>> +1 agree that <resource-file> and <header-file> is redundant. Tooling
>> should be able to distinguish this so merging with <source-file> makes a
>> lot of sense.
>>
>> Looking good!
>>
>> On 6/8/12 6:40 PM, "Andrew Lunny"
>><al...@gmail.com>> wrote:
>>
>>>Hi all,
>>>
>>>I've posted to this list before about pluginstall[1], the tool I've
>>>developed as part of working on PhoneGap Build and requiring
>>>programmatic
>>>installation of Cordova plugins.
>>>
>>>I've now written up a spec for the format that pluginstall uses - I
>>>think
>>>it's generally useful for Cordova plugin installation and manipulation.
>>>The
>>>spec is available on GitHub:
>>>https://github.com/alunny/cordova-plugin-spec
>>>
>>>Issues and/or pull requests and/or forks welcome.
>>>
>>>Cheers,
>>>Andrew
>>>
>>>[1] https://github.com/alunny/pluginstall
>>
>>


Re: Plugin Format and Spec

Posted by Brian LeRoux <b...@brian.io>.
npm does this w/ an 'engines' attribute on package.json

On Mon, Jun 25, 2012 at 10:26 AM, Filip Maj <fi...@adobe.com> wrote:
> One more thing that came to mind is how to support different versions of Cordova? Any ideas?
>
> From: Andrew Lunny <al...@gmail.com>>
> Reply-To: "alunny@gmail.com<ma...@gmail.com>" <al...@gmail.com>>
> To: Default User Nam <fi...@adobe.com>>
> Cc: "callback-dev@incubator.apache.org<ma...@incubator.apache.org>" <ca...@incubator.apache.org>>
> Subject: Re: Plugin Format and Spec
>
>
>
> On 11 June 2012 13:50, Filip Maj <fi...@adobe.com>> wrote:
> Nice work Andrew! I suggest taking this and moving to a cordova wiki page
> (assuming all committers are on board to adopting this as the basis for a
> plugin spec)
>
> A link on the Cordova wiki is probably the best place to start - we can get some more feedback from plugin authors and app developers (i.e. keep this as "a way to write plugins" rather than "the official way to write plugins").
>
>
> Is target-dir necessary for the <source-file> element? For Java files, the
> tooling could take a peak inside the .java file and extract out the
> package name from the file, no? Phonegap build already does this doesn't
> it?
>
> PhoneGap Build did do this, but no longer supports uploading arbitrary Java files. Only plugins with a manifest are supported.
>
> I'm torn - one of the goals of this format is to make it as easy as possible to write tools that use it as possible. Right now, a tool reads one file (plugin.xml) and moves source files (ignoring config files for the moment). I'd prefer it wasn't "read one file, then read each .java file to discover where to move it".
>
> One option is to use the id attribute on the top-level plugin element to resolve the path, but that doesn't handle the case where different Java files will have different paths. I wonder if there are more complex plugins around we can try to convert to see where the pain points are.
>
>
> Adding the ability to modify existing parts of a native platform's config
> document to the <config-file> portion might be needed.. Although Ive yet
> to dig up a use case. Will dig around more.
>
> Agreed - also things like target OS/SDK versions may be required by certain plugins (i.e. this plugin uses an iOS 6 API, so we need to update your project to iOS 6). Probably the best approach there is to warn/prompt the user before proceeding.
>
> +1 agree that <resource-file> and <header-file> is redundant. Tooling
> should be able to distinguish this so merging with <source-file> makes a
> lot of sense.
>
> Looking good!
>
> On 6/8/12 6:40 PM, "Andrew Lunny" <al...@gmail.com>> wrote:
>
>>Hi all,
>>
>>I've posted to this list before about pluginstall[1], the tool I've
>>developed as part of working on PhoneGap Build and requiring programmatic
>>installation of Cordova plugins.
>>
>>I've now written up a spec for the format that pluginstall uses - I think
>>it's generally useful for Cordova plugin installation and manipulation.
>>The
>>spec is available on GitHub:
>>https://github.com/alunny/cordova-plugin-spec
>>
>>Issues and/or pull requests and/or forks welcome.
>>
>>Cheers,
>>Andrew
>>
>>[1] https://github.com/alunny/pluginstall
>
>

Re: Plugin Format and Spec

Posted by Filip Maj <fi...@adobe.com>.
One more thing that came to mind is how to support different versions of Cordova? Any ideas?

From: Andrew Lunny <al...@gmail.com>>
Reply-To: "alunny@gmail.com<ma...@gmail.com>" <al...@gmail.com>>
To: Default User Nam <fi...@adobe.com>>
Cc: "callback-dev@incubator.apache.org<ma...@incubator.apache.org>" <ca...@incubator.apache.org>>
Subject: Re: Plugin Format and Spec



On 11 June 2012 13:50, Filip Maj <fi...@adobe.com>> wrote:
Nice work Andrew! I suggest taking this and moving to a cordova wiki page
(assuming all committers are on board to adopting this as the basis for a
plugin spec)

A link on the Cordova wiki is probably the best place to start - we can get some more feedback from plugin authors and app developers (i.e. keep this as "a way to write plugins" rather than "the official way to write plugins").


Is target-dir necessary for the <source-file> element? For Java files, the
tooling could take a peak inside the .java file and extract out the
package name from the file, no? Phonegap build already does this doesn't
it?

PhoneGap Build did do this, but no longer supports uploading arbitrary Java files. Only plugins with a manifest are supported.

I'm torn - one of the goals of this format is to make it as easy as possible to write tools that use it as possible. Right now, a tool reads one file (plugin.xml) and moves source files (ignoring config files for the moment). I'd prefer it wasn't "read one file, then read each .java file to discover where to move it".

One option is to use the id attribute on the top-level plugin element to resolve the path, but that doesn't handle the case where different Java files will have different paths. I wonder if there are more complex plugins around we can try to convert to see where the pain points are.


Adding the ability to modify existing parts of a native platform's config
document to the <config-file> portion might be needed.. Although Ive yet
to dig up a use case. Will dig around more.

Agreed - also things like target OS/SDK versions may be required by certain plugins (i.e. this plugin uses an iOS 6 API, so we need to update your project to iOS 6). Probably the best approach there is to warn/prompt the user before proceeding.

+1 agree that <resource-file> and <header-file> is redundant. Tooling
should be able to distinguish this so merging with <source-file> makes a
lot of sense.

Looking good!

On 6/8/12 6:40 PM, "Andrew Lunny" <al...@gmail.com>> wrote:

>Hi all,
>
>I've posted to this list before about pluginstall[1], the tool I've
>developed as part of working on PhoneGap Build and requiring programmatic
>installation of Cordova plugins.
>
>I've now written up a spec for the format that pluginstall uses - I think
>it's generally useful for Cordova plugin installation and manipulation.
>The
>spec is available on GitHub:
>https://github.com/alunny/cordova-plugin-spec
>
>Issues and/or pull requests and/or forks welcome.
>
>Cheers,
>Andrew
>
>[1] https://github.com/alunny/pluginstall



Re: Plugin Format and Spec

Posted by Andrew Lunny <al...@gmail.com>.
On 11 June 2012 13:50, Filip Maj <fi...@adobe.com> wrote:

> Nice work Andrew! I suggest taking this and moving to a cordova wiki page
> (assuming all committers are on board to adopting this as the basis for a
> plugin spec)
>

A link on the Cordova wiki is probably the best place to start - we can get
some more feedback from plugin authors and app developers (i.e. keep this
as "a way to write plugins" rather than "the official way to write
plugins").


>
> Is target-dir necessary for the <source-file> element? For Java files, the
> tooling could take a peak inside the .java file and extract out the
> package name from the file, no? Phonegap build already does this doesn't
> it?
>

PhoneGap Build did do this, but no longer supports uploading arbitrary Java
files. Only plugins with a manifest are supported.

I'm torn - one of the goals of this format is to make it as easy as
possible to write tools that use it as possible. Right now, a tool reads
one file (plugin.xml) and moves source files (ignoring config files for the
moment). I'd prefer it wasn't "read one file, then read each .java file to
discover where to move it".

One option is to use the id attribute on the top-level plugin element to
resolve the path, but that doesn't handle the case where different Java
files will have different paths. I wonder if there are more complex plugins
around we can try to convert to see where the pain points are.


>
> Adding the ability to modify existing parts of a native platform's config
> document to the <config-file> portion might be needed.. Although Ive yet
> to dig up a use case. Will dig around more.
>

Agreed - also things like target OS/SDK versions may be required by certain
plugins (i.e. this plugin uses an iOS 6 API, so we need to update your
project to iOS 6). Probably the best approach there is to warn/prompt the
user before proceeding.


> +1 agree that <resource-file> and <header-file> is redundant. Tooling
> should be able to distinguish this so merging with <source-file> makes a
> lot of sense.
>
> Looking good!
>
> On 6/8/12 6:40 PM, "Andrew Lunny" <al...@gmail.com> wrote:
>
> >Hi all,
> >
> >I've posted to this list before about pluginstall[1], the tool I've
> >developed as part of working on PhoneGap Build and requiring programmatic
> >installation of Cordova plugins.
> >
> >I've now written up a spec for the format that pluginstall uses - I think
> >it's generally useful for Cordova plugin installation and manipulation.
> >The
> >spec is available on GitHub:
> >https://github.com/alunny/cordova-plugin-spec
> >
> >Issues and/or pull requests and/or forks welcome.
> >
> >Cheers,
> >Andrew
> >
> >[1] https://github.com/alunny/pluginstall
>
>

Re: Plugin Format and Spec

Posted by Filip Maj <fi...@adobe.com>.
Nice work Andrew! I suggest taking this and moving to a cordova wiki page
(assuming all committers are on board to adopting this as the basis for a
plugin spec)

Is target-dir necessary for the <source-file> element? For Java files, the
tooling could take a peak inside the .java file and extract out the
package name from the file, no? Phonegap build already does this doesn't
it?

Adding the ability to modify existing parts of a native platform's config
document to the <config-file> portion might be needed.. Although Ive yet
to dig up a use case. Will dig around more.

+1 agree that <resource-file> and <header-file> is redundant. Tooling
should be able to distinguish this so merging with <source-file> makes a
lot of sense.

Looking good!

On 6/8/12 6:40 PM, "Andrew Lunny" <al...@gmail.com> wrote:

>Hi all,
>
>I've posted to this list before about pluginstall[1], the tool I've
>developed as part of working on PhoneGap Build and requiring programmatic
>installation of Cordova plugins.
>
>I've now written up a spec for the format that pluginstall uses - I think
>it's generally useful for Cordova plugin installation and manipulation.
>The
>spec is available on GitHub:
>https://github.com/alunny/cordova-plugin-spec
>
>Issues and/or pull requests and/or forks welcome.
>
>Cheers,
>Andrew
>
>[1] https://github.com/alunny/pluginstall