You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@weex.apache.org by Tiago Alves <tr...@gmail.com> on 2017/11/04 18:06:39 UTC

Plugin development

Good day!

I am developing a weex plugin. I feel it will be a great oportunity for me
to help improving the plugin docs.

I remember reading docs about developing a weex plugin (plugin.xml, etc),
but thats seems to be gone along with the legacy stuff. Is there any docs
that would help me getting started?

I am using this plugin as reference
https://github.com/weex-plugins/weex-amap, but this sort of reverse
engineering gives the constant feeling that I am missing out on something.

Thanks!
Tiago

Re: Plugin development

Posted by Adam Feng <cx...@gmail.com>.
Hi,

Again,  thanks for your contribution.

Maybe I can answer the first question,   The PR title should be of the form [WEEX-xxxx][COMPONENT] Title, where xxxx is the relevant JIRA number, COMPONENT is one of the PR categories(android, iOS, jsfm, web, component, doc, website, example, test, other) , which is described in our develop process [1] (being reviewed and will be merged soon).

For the second question,  can any Android developers have a check?

[1] https://github.com/cxfeng1/incubator-weex-site/blob/doc-contributing/source/development-process.md

Thanks.
Adam Feng

On 5 Nov 2017, 10:40 PM +0800, Tiago Alves <tr...@gmail.com>, wrote:
> Hi!
>
> Done! https://github.com/apache/incubator-weex-site/pull/8 :D
>
> I have a couple questions:
>
> - Why do all PR names start with [WEEX-86][doc]? Namely, what does
> [WEEX-86] mean? I think this explanation should be part of the contributing
> guide.
>
> - I couldn't quite get the android test plugin playground app to work on my
> machine. The android dependencies are not correct. Anyone knows how to run
> the android playground app inside the plugin project (playground/android)?
>
> Thanks!
> Tiago
>
>
> On Sun, 5 Nov 2017 at 04:13 Adam Feng <cx...@gmail.com> wrote:
>
> > Hi, Tiago,
> >
> > Thanks for your contribution! You can follow the new contribution
> > guide[1](which is being reviewed and will be merged soon) to improve the
> > documentation.
> >
> > [1]
> > https://github.com/cxfeng1/incubator-weex-site/blob/6a04e077e896709c5797ad30d9a31632a8e0a193/source/contributing.md
> >
> > Thanks.
> > Adam Feng
> >
> > On 5 Nov 2017, 3:28 AM +0800, Tiago Alves <tr...@gmail.com>, wrote:
> > > I figured it out.
> > >
> > > weex plugin create weex-my-plugin
> > >
> > > Then there are more instructions in doc/how-to-develop.md.
> > >
> > > I will translate this document, add more info and PR it to the docs.
> > Seems
> > > important!
> > >
> > > Tiago
> > >
> > > On Sat, 4 Nov 2017 at 16:06 Tiago Alves <tr...@gmail.com> wrote:
> > >
> > > > Good day!
> > > >
> > > > I am developing a weex plugin. I feel it will be a great oportunity
> > for me
> > > > to help improving the plugin docs.
> > > >
> > > > I remember reading docs about developing a weex plugin (plugin.xml,
> > etc),
> > > > but thats seems to be gone along with the legacy stuff. Is there any
> > docs
> > > > that would help me getting started?
> > > >
> > > > I am using this plugin as reference
> > > > https://github.com/weex-plugins/weex-amap, but this sort of reverse
> > > > engineering gives the constant feeling that I am missing out on
> > something.
> > > >
> > > > Thanks!
> > > > Tiago
> > > >
> >

Re: Plugin development

Posted by Tiago Alves <tr...@gmail.com>.
Hi!

Done! https://github.com/apache/incubator-weex-site/pull/8 :D

I have a couple questions:

- Why do all PR names start with [WEEX-86][doc]? Namely, what does
[WEEX-86] mean? I think this explanation should be part of the contributing
guide.

- I couldn't quite get the android test plugin playground app to work on my
machine. The android dependencies are not correct. Anyone knows how to run
the android playground app inside the plugin project (playground/android)?

Thanks!
Tiago


On Sun, 5 Nov 2017 at 04:13 Adam Feng <cx...@gmail.com> wrote:

> Hi, Tiago,
>
> Thanks for your contribution! You can follow the new contribution
> guide[1](which is being reviewed and will be merged soon) to improve the
> documentation.
>
> [1]
> https://github.com/cxfeng1/incubator-weex-site/blob/6a04e077e896709c5797ad30d9a31632a8e0a193/source/contributing.md
>
> Thanks.
> Adam Feng
>
> On 5 Nov 2017, 3:28 AM +0800, Tiago Alves <tr...@gmail.com>, wrote:
> > I figured it out.
> >
> > weex plugin create weex-my-plugin
> >
> > Then there are more instructions in doc/how-to-develop.md.
> >
> > I will translate this document, add more info and PR it to the docs.
> Seems
> > important!
> >
> > Tiago
> >
> > On Sat, 4 Nov 2017 at 16:06 Tiago Alves <tr...@gmail.com> wrote:
> >
> > > Good day!
> > >
> > > I am developing a weex plugin. I feel it will be a great oportunity
> for me
> > > to help improving the plugin docs.
> > >
> > > I remember reading docs about developing a weex plugin (plugin.xml,
> etc),
> > > but thats seems to be gone along with the legacy stuff. Is there any
> docs
> > > that would help me getting started?
> > >
> > > I am using this plugin as reference
> > > https://github.com/weex-plugins/weex-amap, but this sort of reverse
> > > engineering gives the constant feeling that I am missing out on
> something.
> > >
> > > Thanks!
> > > Tiago
> > >
>

Re: Plugin development

Posted by Adam Feng <cx...@gmail.com>.
Hi, Tiago,

Thanks for your contribution! You can follow the new contribution guide[1](which is being reviewed and will be merged soon) to improve the documentation.

[1] https://github.com/cxfeng1/incubator-weex-site/blob/6a04e077e896709c5797ad30d9a31632a8e0a193/source/contributing.md

Thanks.
Adam Feng

On 5 Nov 2017, 3:28 AM +0800, Tiago Alves <tr...@gmail.com>, wrote:
> I figured it out.
>
> weex plugin create weex-my-plugin
>
> Then there are more instructions in doc/how-to-develop.md.
>
> I will translate this document, add more info and PR it to the docs. Seems
> important!
>
> Tiago
>
> On Sat, 4 Nov 2017 at 16:06 Tiago Alves <tr...@gmail.com> wrote:
>
> > Good day!
> >
> > I am developing a weex plugin. I feel it will be a great oportunity for me
> > to help improving the plugin docs.
> >
> > I remember reading docs about developing a weex plugin (plugin.xml, etc),
> > but thats seems to be gone along with the legacy stuff. Is there any docs
> > that would help me getting started?
> >
> > I am using this plugin as reference
> > https://github.com/weex-plugins/weex-amap, but this sort of reverse
> > engineering gives the constant feeling that I am missing out on something.
> >
> > Thanks!
> > Tiago
> >

Re: Plugin development

Posted by xing zhang <zh...@gmail.com>.
Cool~~

2017-11-05 3:28 GMT+08:00 Tiago Alves <tr...@gmail.com>:

> I figured it out.
>
> weex plugin create weex-my-plugin
>
> Then there are more instructions in doc/how-to-develop.md.
>
> I will translate this document, add more info and PR it to the docs. Seems
> important!
>
> Tiago
>
> On Sat, 4 Nov 2017 at 16:06 Tiago Alves <tr...@gmail.com> wrote:
>
> > Good day!
> >
> > I am developing a weex plugin. I feel it will be a great oportunity for
> me
> > to help improving the plugin docs.
> >
> > I remember reading docs about developing a weex plugin (plugin.xml, etc),
> > but thats seems to be gone along with the legacy stuff. Is there any docs
> > that would help me getting started?
> >
> > I am using this plugin as reference
> > https://github.com/weex-plugins/weex-amap, but this sort of reverse
> > engineering gives the constant feeling that I am missing out on
> something.
> >
> > Thanks!
> > Tiago
> >
>

Re: Plugin development

Posted by Tiago Alves <tr...@gmail.com>.
I figured it out.

weex plugin create weex-my-plugin

Then there are more instructions in doc/how-to-develop.md.

I will translate this document, add more info and PR it to the docs. Seems
important!

Tiago

On Sat, 4 Nov 2017 at 16:06 Tiago Alves <tr...@gmail.com> wrote:

> Good day!
>
> I am developing a weex plugin. I feel it will be a great oportunity for me
> to help improving the plugin docs.
>
> I remember reading docs about developing a weex plugin (plugin.xml, etc),
> but thats seems to be gone along with the legacy stuff. Is there any docs
> that would help me getting started?
>
> I am using this plugin as reference
> https://github.com/weex-plugins/weex-amap, but this sort of reverse
> engineering gives the constant feeling that I am missing out on something.
>
> Thanks!
> Tiago
>

Re: Plugin development

Posted by Tiago Alves <tr...@gmail.com>.
Hi!

I just made two PRs to feature-generator. The first uniformizes the plugin name to lowerCamelCase and the second updates the docs as we discussed earlier in this thread.

I think this generator is getting really good! The only missing piece is the android playground app. I could not test the plugin from the android app, even by opening the test page using the QR code…

Everything else (iOS, Web) just works out of the box.

Thanks!
Tiago

On 13 Nov 2017 09:35 -0200, Tiago Alves <tr...@gmail.com>, wrote:
> Hi!
>
> When you open the iOS playground app, it does open the app in the example folder. And that is great! To develop my plugin I can make a test app in examples/index.vue and then run/test using the apps in the playground folder.
>
> We should find a way to make it possible with android without the whole hassle of generating a QR code, scan, etc. I will try again later.
>
> Thanks!
> Tiago
>
> On 13 Nov 2017 04:45 -0200, Drew Hansen <fa...@gmail.com>, wrote:
> > Hi, Tiago,
> >
> > The playground can only build your native source code, but you also need a
> > Jsbundle to scan to test your work, you can use http://dotwe.org/vue or use
> > "weex test.vue" to generate a QRcode, after you scan the QRcode, you can
> > confirm your plugin logic is valid. Also, If you have other improvements,
> > you are welcome to create PR on generator-weex-plugin:feature-generator
> > <https://github.com/weexteam/generator-weex-plugin/tree/feature-generator>.
> >
> > Thanks!
> >
> >
> >
> > 2017-11-13 10:12 GMT+08:00 Tiago Alves <tr...@gmail.com>:
> >
> > > Hi Drew!
> > >
> > > I tested the new plugin generator. Everything worked with android, but I
> > > keep getting the default playground app and not the plugin test app. I
> > > tried different things in the IndexActivity.java, but couldn’t get it to
> > > work.
> > >
> > > On iOS, the test app opens properly. The problem is that the plugin does
> > > not load properly.
> > >
> > > I will dig deeper later, but I though you could have an idea on how to
> > > solve these issues.
> > >
> > > Thanks!
> > > Tiago
> > >
> > > On 7 Nov 2017 11:36 -0200, Drew Hansen <fa...@gmail.com>, wrote:
> > > > Hi Tiago,
> > > >
> > > > I can not more agree with your idea, and the current plugin integration
> > > > mechanism still has some problems, I think it's time we should put some
> > > > people in order to optimize the developer experience with plugins.
> > > >
> > > > Thanks for getting back to me.
> > >

Re: Plugin development

Posted by Tiago Alves <tr...@gmail.com>.
Hi!

When you open the iOS playground app, it does open the app in the example folder. And that is great! To develop my plugin I can make a test app in examples/index.vue and then run/test using the apps in the playground folder.

We should find a way to make it possible with android without the whole hassle of generating a QR code, scan, etc. I will try again later.

Thanks!
Tiago

On 13 Nov 2017 04:45 -0200, Drew Hansen <fa...@gmail.com>, wrote:
> Hi, Tiago,
>
> The playground can only build your native source code, but you also need a
> Jsbundle to scan to test your work, you can use http://dotwe.org/vue or use
> "weex test.vue" to generate a QRcode, after you scan the QRcode, you can
> confirm your plugin logic is valid. Also, If you have other improvements,
> you are welcome to create PR on generator-weex-plugin:feature-generator
> <https://github.com/weexteam/generator-weex-plugin/tree/feature-generator>.
>
> Thanks!
>
>
>
> 2017-11-13 10:12 GMT+08:00 Tiago Alves <tr...@gmail.com>:
>
> > Hi Drew!
> >
> > I tested the new plugin generator. Everything worked with android, but I
> > keep getting the default playground app and not the plugin test app. I
> > tried different things in the IndexActivity.java, but couldn’t get it to
> > work.
> >
> > On iOS, the test app opens properly. The problem is that the plugin does
> > not load properly.
> >
> > I will dig deeper later, but I though you could have an idea on how to
> > solve these issues.
> >
> > Thanks!
> > Tiago
> >
> > On 7 Nov 2017 11:36 -0200, Drew Hansen <fa...@gmail.com>, wrote:
> > > Hi Tiago,
> > >
> > > I can not more agree with your idea, and the current plugin integration
> > > mechanism still has some problems, I think it's time we should put some
> > > people in order to optimize the developer experience with plugins.
> > >
> > > Thanks for getting back to me.
> >

Re: Plugin development

Posted by Drew Hansen <fa...@gmail.com>.
Hi, Tiago,

The playground can only build your native source code, but you also need a
Jsbundle to scan to test your work, you can use http://dotwe.org/vue or use
"weex test.vue"  to generate a QRcode, after you scan the QRcode, you can
confirm your plugin logic is valid. Also, If you have other improvements,
you are welcome to create PR on generator-weex-plugin:feature-generator
<https://github.com/weexteam/generator-weex-plugin/tree/feature-generator>.

Thanks!



2017-11-13 10:12 GMT+08:00 Tiago Alves <tr...@gmail.com>:

> Hi Drew!
>
> I tested the new plugin generator. Everything worked with android, but I
> keep getting the default playground app and not the plugin test app. I
> tried different things in the IndexActivity.java, but couldn’t get it to
> work.
>
> On iOS, the test app opens properly. The problem is that the plugin does
> not load properly.
>
> I will dig deeper later, but I though you could have an idea on how to
> solve these issues.
>
> Thanks!
> Tiago
>
> On 7 Nov 2017 11:36 -0200, Drew Hansen <fa...@gmail.com>, wrote:
> > Hi Tiago,
> >
> > I can not more agree with your idea, and the current plugin integration
> > mechanism still has some problems, I think it's time we should put some
> > people in order to optimize the developer experience with plugins.
> >
> > Thanks for getting back to me.
>

Re: Plugin development

Posted by Tiago Alves <tr...@gmail.com>.
Hi Drew!

I tested the new plugin generator. Everything worked with android, but I keep getting the default playground app and not the plugin test app. I tried different things in the IndexActivity.java, but couldn’t get it to work.

On iOS, the test app opens properly. The problem is that the plugin does not load properly.

I will dig deeper later, but I though you could have an idea on how to solve these issues.

Thanks!
Tiago

On 7 Nov 2017 11:36 -0200, Drew Hansen <fa...@gmail.com>, wrote:
> Hi Tiago,
>
> I can not more agree with your idea, and the current plugin integration
> mechanism still has some problems, I think it's time we should put some
> people in order to optimize the developer experience with plugins.
>
> Thanks for getting back to me.

Re: Plugin development

Posted by Drew Hansen <fa...@gmail.com>.
Hi Tiago,

I can not more agree with your idea,  and the current plugin integration
mechanism still has some problems, I think it's time we should put some
people in order to optimize the developer experience with plugins.

Thanks for getting back to me.

Re: Plugin development

Posted by Tiago Alves <tr...@gmail.com>.
Hi Drew!

Wow, that is a lot of work. Thanks! I will try the new code later.

About the documentation, I just had submitted a PR to incubator-weex-site
<https://github.com/apache/incubator-weex-site/pull/8>, which is obviously
now outdated. I will merge your docs into that PR.

Also, I think that the documentation inside the plugin template does not
need instructions on how to create the plugin because the user obviously
already did that part. Instead, I suggest that the plugin template only has
documentation on:
1- how to install dependencies,
2- starting the debug apps
3- developing the plugin (with references to the extend-ios, extend-android
and extend-web docs, like you mentioned).

Tiago

On Tue, 7 Nov 2017 at 06:50 Drew Hansen <fa...@gmail.com> wrote:

> Hi, Tiago,
>
>  I have fixed this issue in the latest version of weexpack, you can update
> it with the command below:
>
> `rm -rf ~/.xtoolkit/node_modules/weexpack && weex update weexpack`
>
> Re-create your plugin project by `weex plugin create xxx`.
>
> In addition to fixing some issues on Android, some changes have also been
> made to the Initialized project:
>
> 1. Due to the fact that the ".we" project has been stopped for the moment,
> the support for ".we" in the plugin development has been removed.
>
> 2. Remove "./start" and "./start-web" file, because these commands do not
> support the development of all normal platforms (such as windows). As an
> alternative, you can startup playground via the `npm run start:web` command
> and `npm run start:native` command.
>
> 3. Added more tips on how to build thrid-part module or component on
> javascript.
>
> 4. I think we also need to put the document in the initialization project
> to facilitate the developer to view, so I created two folders en and cn-zh
> to save the doc, I will regularly pull the latest document from the
> document on "incubator-weex-site" to the folders.
>
> Let me know if you have any questions or concerns.
>
> Thanks!
>
> 2017-11-07 11:26 GMT+08:00 Tiago Alves <tr...@gmail.com>:
>
> > Hi,
> >
> > I have been digging my issues and this is what I found:
> >
> > 1- I am really using the latest playground app. My project is using this
> > code:
> > https://github.com/weexteam/generator-weex-plugin/tree/
> > feature-generator/generators/app/templates/playground/android
> >
> > 2- I had to make the following changes:
> >
> > *playground/android/build.gradle:*
> >  - removed Alibaba maven repositories and added mavenCentral()
> >  - Android Studio upgraded gradle to 3.0.0
> >
> > *playground/**android/app/build.gradle:*
> >  - commented the lines
> > // compile ('com.taobao.android:weex_debug:0.0.1@aar') {
> > // transitive = false
> > // }
> >
> > *android/library/build.gradle:*
> >  - add the line
> > annotationProcessor 'org.weex.plugin:processor:1.0.2'
> >
> > 3- Android Studio made other changes automatically, like sdk versions
> etc.
> >
> > 4- *In the end, the playground app runs but it shows the demo playground
> > app instead of the app with the plugin.*
> >
> > I am sorry I couldn't find all the issues. Probably some of the problems
> > are caused by my machine set up...
> >
> > Any clues?
> >
> > Thanks!
> > Tiago
> >
> > On Tue, 7 Nov 2017 at 00:08 Tiago Alves <tr...@gmail.com> wrote:
> >
> > > Hi!
> > >
> > > Unfortunately, the android project still doesn't open.
> > >
> > > I am opening the project in Android Studio from the
> > > playground/android/build.gradle. Android Studio stays loading forever
> > with
> > > the message:
> > > Gradle: Resolve dependencies ':app:_debugCompile...
> > >
> > > This is my setup:
> > > ➜  ios git:(master) ✗ weex -v
> > >    v1.1.0-beta.6
> > >  - weexpack : v0.4.7-beta.19
> > >  - weex-builder : v0.2.13-beta.4
> > >  - weex-devtool : v0.3.2-beta.7
> > >  - weex-previewer : v1.3.13-beta.8
> > >
> > > Am I doing something wrong?
> > >
> > > Thanks,
> > > Tiago
> > >
> > > On Mon, 6 Nov 2017 at 12:52 Tiago Alves <tr...@gmail.com> wrote:
> > >
> > >> Thanks! I will try that.
> > >>
> > >> Tiago
> > >>
> > >> On Mon, 6 Nov 2017 at 09:42 misakuo <mi...@apache.org> wrote:
> > >>
> > >>> Hi Tiago,
> > >>>
> > >>> We found the old version of weexpack relied on an incorrect android
> > >>> project
> > >>> template that missing some necessary files. We just released a new
> > >>> version
> > >>> of weexpack,  you can upgrade it according to the following steps:
> > >>>
> > >>> 1. run " rm -rf ~/.xtoolkit/node_modules/weexpack "
> > >>> 2. run " weex update weexpack "
> > >>> 3. create a new plugin project using " weex plugin create xxx "
> > >>>
> > >>> Then you should be able to run playground app inslde the plugin
> project
> > >>> correctly. If you have any other questions, just feel free to ask us.
> > >>>
> > >>> Cheers.
> > >>> Misakuo
> > >>>
> > >>>
> > >>> 2017-11-05 2:06 GMT+08:00 Tiago Alves <tr...@gmail.com>:
> > >>>
> > >>> > Good day!
> > >>> >
> > >>> > I am developing a weex plugin. I feel it will be a great oportunity
> > >>> for me
> > >>> > to help improving the plugin docs.
> > >>> >
> > >>> > I remember reading docs about developing a weex plugin (plugin.xml,
> > >>> etc),
> > >>> > but thats seems to be gone along with the legacy stuff. Is there
> any
> > >>> docs
> > >>> > that would help me getting started?
> > >>> >
> > >>> > I am using this plugin as reference
> > >>> > https://github.com/weex-plugins/weex-amap, but this sort of
> reverse
> > >>> > engineering gives the constant feeling that I am missing out on
> > >>> something.
> > >>> >
> > >>> > Thanks!
> > >>> > Tiago
> > >>> >
> > >>>
> > >>
> >
>

Re: Plugin development

Posted by Drew Hansen <fa...@gmail.com>.
Hi, Tiago,

 I have fixed this issue in the latest version of weexpack, you can update
it with the command below:

`rm -rf ~/.xtoolkit/node_modules/weexpack && weex update weexpack`

Re-create your plugin project by `weex plugin create xxx`.

In addition to fixing some issues on Android, some changes have also been
made to the Initialized project:

1. Due to the fact that the ".we" project has been stopped for the moment,
the support for ".we" in the plugin development has been removed.

2. Remove "./start" and "./start-web" file, because these commands do not
support the development of all normal platforms (such as windows). As an
alternative, you can startup playground via the `npm run start:web` command
and `npm run start:native` command.

3. Added more tips on how to build thrid-part module or component on
javascript.

4. I think we also need to put the document in the initialization project
to facilitate the developer to view, so I created two folders en and cn-zh
to save the doc, I will regularly pull the latest document from the
document on "incubator-weex-site" to the folders.

Let me know if you have any questions or concerns.

Thanks!

2017-11-07 11:26 GMT+08:00 Tiago Alves <tr...@gmail.com>:

> Hi,
>
> I have been digging my issues and this is what I found:
>
> 1- I am really using the latest playground app. My project is using this
> code:
> https://github.com/weexteam/generator-weex-plugin/tree/
> feature-generator/generators/app/templates/playground/android
>
> 2- I had to make the following changes:
>
> *playground/android/build.gradle:*
>  - removed Alibaba maven repositories and added mavenCentral()
>  - Android Studio upgraded gradle to 3.0.0
>
> *playground/**android/app/build.gradle:*
>  - commented the lines
> // compile ('com.taobao.android:weex_debug:0.0.1@aar') {
> // transitive = false
> // }
>
> *android/library/build.gradle:*
>  - add the line
> annotationProcessor 'org.weex.plugin:processor:1.0.2'
>
> 3- Android Studio made other changes automatically, like sdk versions etc.
>
> 4- *In the end, the playground app runs but it shows the demo playground
> app instead of the app with the plugin.*
>
> I am sorry I couldn't find all the issues. Probably some of the problems
> are caused by my machine set up...
>
> Any clues?
>
> Thanks!
> Tiago
>
> On Tue, 7 Nov 2017 at 00:08 Tiago Alves <tr...@gmail.com> wrote:
>
> > Hi!
> >
> > Unfortunately, the android project still doesn't open.
> >
> > I am opening the project in Android Studio from the
> > playground/android/build.gradle. Android Studio stays loading forever
> with
> > the message:
> > Gradle: Resolve dependencies ':app:_debugCompile...
> >
> > This is my setup:
> > ➜  ios git:(master) ✗ weex -v
> >    v1.1.0-beta.6
> >  - weexpack : v0.4.7-beta.19
> >  - weex-builder : v0.2.13-beta.4
> >  - weex-devtool : v0.3.2-beta.7
> >  - weex-previewer : v1.3.13-beta.8
> >
> > Am I doing something wrong?
> >
> > Thanks,
> > Tiago
> >
> > On Mon, 6 Nov 2017 at 12:52 Tiago Alves <tr...@gmail.com> wrote:
> >
> >> Thanks! I will try that.
> >>
> >> Tiago
> >>
> >> On Mon, 6 Nov 2017 at 09:42 misakuo <mi...@apache.org> wrote:
> >>
> >>> Hi Tiago,
> >>>
> >>> We found the old version of weexpack relied on an incorrect android
> >>> project
> >>> template that missing some necessary files. We just released a new
> >>> version
> >>> of weexpack,  you can upgrade it according to the following steps:
> >>>
> >>> 1. run " rm -rf ~/.xtoolkit/node_modules/weexpack "
> >>> 2. run " weex update weexpack "
> >>> 3. create a new plugin project using " weex plugin create xxx "
> >>>
> >>> Then you should be able to run playground app inslde the plugin project
> >>> correctly. If you have any other questions, just feel free to ask us.
> >>>
> >>> Cheers.
> >>> Misakuo
> >>>
> >>>
> >>> 2017-11-05 2:06 GMT+08:00 Tiago Alves <tr...@gmail.com>:
> >>>
> >>> > Good day!
> >>> >
> >>> > I am developing a weex plugin. I feel it will be a great oportunity
> >>> for me
> >>> > to help improving the plugin docs.
> >>> >
> >>> > I remember reading docs about developing a weex plugin (plugin.xml,
> >>> etc),
> >>> > but thats seems to be gone along with the legacy stuff. Is there any
> >>> docs
> >>> > that would help me getting started?
> >>> >
> >>> > I am using this plugin as reference
> >>> > https://github.com/weex-plugins/weex-amap, but this sort of reverse
> >>> > engineering gives the constant feeling that I am missing out on
> >>> something.
> >>> >
> >>> > Thanks!
> >>> > Tiago
> >>> >
> >>>
> >>
>

Re: Plugin development

Posted by Tiago Alves <tr...@gmail.com>.
Hi,

I have been digging my issues and this is what I found:

1- I am really using the latest playground app. My project is using this
code:
https://github.com/weexteam/generator-weex-plugin/tree/feature-generator/generators/app/templates/playground/android

2- I had to make the following changes:

*playground/android/build.gradle:*
 - removed Alibaba maven repositories and added mavenCentral()
 - Android Studio upgraded gradle to 3.0.0

*playground/**android/app/build.gradle:*
 - commented the lines
// compile ('com.taobao.android:weex_debug:0.0.1@aar') {
// transitive = false
// }

*android/library/build.gradle:*
 - add the line
annotationProcessor 'org.weex.plugin:processor:1.0.2'

3- Android Studio made other changes automatically, like sdk versions etc.

4- *In the end, the playground app runs but it shows the demo playground
app instead of the app with the plugin.*

I am sorry I couldn't find all the issues. Probably some of the problems
are caused by my machine set up...

Any clues?

Thanks!
Tiago

On Tue, 7 Nov 2017 at 00:08 Tiago Alves <tr...@gmail.com> wrote:

> Hi!
>
> Unfortunately, the android project still doesn't open.
>
> I am opening the project in Android Studio from the
> playground/android/build.gradle. Android Studio stays loading forever with
> the message:
> Gradle: Resolve dependencies ':app:_debugCompile...
>
> This is my setup:
> ➜  ios git:(master) ✗ weex -v
>    v1.1.0-beta.6
>  - weexpack : v0.4.7-beta.19
>  - weex-builder : v0.2.13-beta.4
>  - weex-devtool : v0.3.2-beta.7
>  - weex-previewer : v1.3.13-beta.8
>
> Am I doing something wrong?
>
> Thanks,
> Tiago
>
> On Mon, 6 Nov 2017 at 12:52 Tiago Alves <tr...@gmail.com> wrote:
>
>> Thanks! I will try that.
>>
>> Tiago
>>
>> On Mon, 6 Nov 2017 at 09:42 misakuo <mi...@apache.org> wrote:
>>
>>> Hi Tiago,
>>>
>>> We found the old version of weexpack relied on an incorrect android
>>> project
>>> template that missing some necessary files. We just released a new
>>> version
>>> of weexpack,  you can upgrade it according to the following steps:
>>>
>>> 1. run " rm -rf ~/.xtoolkit/node_modules/weexpack "
>>> 2. run " weex update weexpack "
>>> 3. create a new plugin project using " weex plugin create xxx "
>>>
>>> Then you should be able to run playground app inslde the plugin project
>>> correctly. If you have any other questions, just feel free to ask us.
>>>
>>> Cheers.
>>> Misakuo
>>>
>>>
>>> 2017-11-05 2:06 GMT+08:00 Tiago Alves <tr...@gmail.com>:
>>>
>>> > Good day!
>>> >
>>> > I am developing a weex plugin. I feel it will be a great oportunity
>>> for me
>>> > to help improving the plugin docs.
>>> >
>>> > I remember reading docs about developing a weex plugin (plugin.xml,
>>> etc),
>>> > but thats seems to be gone along with the legacy stuff. Is there any
>>> docs
>>> > that would help me getting started?
>>> >
>>> > I am using this plugin as reference
>>> > https://github.com/weex-plugins/weex-amap, but this sort of reverse
>>> > engineering gives the constant feeling that I am missing out on
>>> something.
>>> >
>>> > Thanks!
>>> > Tiago
>>> >
>>>
>>

Re: Plugin development

Posted by Tiago Alves <tr...@gmail.com>.
Hi!

Unfortunately, the android project still doesn't open.

I am opening the project in Android Studio from the
playground/android/build.gradle. Android Studio stays loading forever with
the message:
Gradle: Resolve dependencies ':app:_debugCompile...

This is my setup:
➜  ios git:(master) ✗ weex -v
   v1.1.0-beta.6
 - weexpack : v0.4.7-beta.19
 - weex-builder : v0.2.13-beta.4
 - weex-devtool : v0.3.2-beta.7
 - weex-previewer : v1.3.13-beta.8

Am I doing something wrong?

Thanks,
Tiago

On Mon, 6 Nov 2017 at 12:52 Tiago Alves <tr...@gmail.com> wrote:

> Thanks! I will try that.
>
> Tiago
>
> On Mon, 6 Nov 2017 at 09:42 misakuo <mi...@apache.org> wrote:
>
>> Hi Tiago,
>>
>> We found the old version of weexpack relied on an incorrect android
>> project
>> template that missing some necessary files. We just released a new version
>> of weexpack,  you can upgrade it according to the following steps:
>>
>> 1. run " rm -rf ~/.xtoolkit/node_modules/weexpack "
>> 2. run " weex update weexpack "
>> 3. create a new plugin project using " weex plugin create xxx "
>>
>> Then you should be able to run playground app inslde the plugin project
>> correctly. If you have any other questions, just feel free to ask us.
>>
>> Cheers.
>> Misakuo
>>
>>
>> 2017-11-05 2:06 GMT+08:00 Tiago Alves <tr...@gmail.com>:
>>
>> > Good day!
>> >
>> > I am developing a weex plugin. I feel it will be a great oportunity for
>> me
>> > to help improving the plugin docs.
>> >
>> > I remember reading docs about developing a weex plugin (plugin.xml,
>> etc),
>> > but thats seems to be gone along with the legacy stuff. Is there any
>> docs
>> > that would help me getting started?
>> >
>> > I am using this plugin as reference
>> > https://github.com/weex-plugins/weex-amap, but this sort of reverse
>> > engineering gives the constant feeling that I am missing out on
>> something.
>> >
>> > Thanks!
>> > Tiago
>> >
>>
>

Re: Plugin development

Posted by Tiago Alves <tr...@gmail.com>.
Thanks! I will try that.

Tiago

On Mon, 6 Nov 2017 at 09:42 misakuo <mi...@apache.org> wrote:

> Hi Tiago,
>
> We found the old version of weexpack relied on an incorrect android project
> template that missing some necessary files. We just released a new version
> of weexpack,  you can upgrade it according to the following steps:
>
> 1. run " rm -rf ~/.xtoolkit/node_modules/weexpack "
> 2. run " weex update weexpack "
> 3. create a new plugin project using " weex plugin create xxx "
>
> Then you should be able to run playground app inslde the plugin project
> correctly. If you have any other questions, just feel free to ask us.
>
> Cheers.
> Misakuo
>
>
> 2017-11-05 2:06 GMT+08:00 Tiago Alves <tr...@gmail.com>:
>
> > Good day!
> >
> > I am developing a weex plugin. I feel it will be a great oportunity for
> me
> > to help improving the plugin docs.
> >
> > I remember reading docs about developing a weex plugin (plugin.xml, etc),
> > but thats seems to be gone along with the legacy stuff. Is there any docs
> > that would help me getting started?
> >
> > I am using this plugin as reference
> > https://github.com/weex-plugins/weex-amap, but this sort of reverse
> > engineering gives the constant feeling that I am missing out on
> something.
> >
> > Thanks!
> > Tiago
> >
>

Re: Plugin development

Posted by misakuo <mi...@apache.org>.
Hi Tiago,

We found the old version of weexpack relied on an incorrect android project
template that missing some necessary files. We just released a new version
of weexpack,  you can upgrade it according to the following steps:

1. run " rm -rf ~/.xtoolkit/node_modules/weexpack "
2. run " weex update weexpack "
3. create a new plugin project using " weex plugin create xxx "

Then you should be able to run playground app inslde the plugin project
correctly. If you have any other questions, just feel free to ask us.

Cheers.
Misakuo


2017-11-05 2:06 GMT+08:00 Tiago Alves <tr...@gmail.com>:

> Good day!
>
> I am developing a weex plugin. I feel it will be a great oportunity for me
> to help improving the plugin docs.
>
> I remember reading docs about developing a weex plugin (plugin.xml, etc),
> but thats seems to be gone along with the legacy stuff. Is there any docs
> that would help me getting started?
>
> I am using this plugin as reference
> https://github.com/weex-plugins/weex-amap, but this sort of reverse
> engineering gives the constant feeling that I am missing out on something.
>
> Thanks!
> Tiago
>