You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Vladimir Kotikov (JIRA)" <ji...@apache.org> on 2016/01/06 09:42:39 UTC

[jira] [Comment Edited] (CB-10284) Adding plugins seems to be totally broken on Cordova 5.4.0 and 5.4.1

    [ https://issues.apache.org/jira/browse/CB-10284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15085212#comment-15085212 ] 

Vladimir Kotikov edited comment on CB-10284 at 1/6/16 8:42 AM:
---------------------------------------------------------------

[~SebastienP], this is not a bug but expected behaviour.

Since the PlatformApi refactoring the location for this file has changed. The correct version of this file is now being kept in {{platforms/<platform>/<platform>.json}}, i.e. in your case in {{platforms/android/android.json}}. This was made because the platforms now do not depend on CLI/Plugman in terms of plugin installation, and hence need to store related information (already installed plugins, config munge, etc.) inside of platform folder. The old file is still exists though, because CLI still need to persist installed plugins names and dependencies information.

Please also see CB-9976 for more context



was (Author: vladimir.kotikov):
[~SebastienP] This is not a bug but expected behaviour.

Since the PlatformApi refactoring the location for this file has changed. The correct version of this file is now being kept in {{platforms/<platform>/<platform>.json}}, i.e. in your case in {{platforms/android/android.json}}. This was made because the platforms now do not depend on CLI/Plugman in terms of plugin installation, and hence need to store related information (already installed plugins, config munge, etc.) inside of platform folder. The old file is still exists though, because CLI still need to persist installed plugins names and dependencies information.

Please also see CB-9976 for more context


> Adding plugins seems to be totally broken on Cordova 5.4.0 and 5.4.1
> --------------------------------------------------------------------
>
>                 Key: CB-10284
>                 URL: https://issues.apache.org/jira/browse/CB-10284
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaLib
>    Affects Versions: 5.4.0, 5.4.1
>         Environment: Mac OS X 10.10.5
>            Reporter: Sebastien
>            Assignee: Vladimir Kotikov
>            Priority: Blocker
>              Labels: patch
>
> Using Cordova CLI 5.3.3, try creating a new project and then adding the Android platform and the whitelist plugin (using `$ cordova plugin add cordova-plugin-whitelist@1.2.0`). Then open the _plugins/android.json_ file, its content is:
> {code:javascript|title=plugins/android.json}
> {
>     "prepare_queue": {
>         "installed": [],
>         "uninstalled": []
>     },
>     "config_munge": {
>         "files": {
>             "res/xml/config.xml": {
>                 "parents": {
>                     "/*": [
>                         {
>                             "xml": "<feature name=\"Whitelist\"><param name=\"android-package\" value=\"org.apache.cordova.whitelist.WhitelistPlugin\" /><param name=\"onload\" value=\"true\" /></feature>",
>                             "count": 1
>                         }
>                     ]
>                 }
>             }
>         }
>     },
>     "installed_plugins": {
>         "cordova-plugin-whitelist": {
>             "PACKAGE_NAME": "com.my-app.dev"
>         }
>     },
>     "dependent_plugins": {}
> }
> {code}
> Now start another project using Cordova CLI 5.4.0 or 5.4.1 and do the same exact thing. The file content is:
> {code:javascript|title=plugins/android.json}
> {
>     "prepare_queue": {
>         "installed": [],
>         "uninstalled": []
>     },
>     "config_munge": {
>         "files": {}
>     },
>     "installed_plugins": {
>         "cordova-plugin-whitelist": {
>             "PACKAGE_NAME": "com.my-app.dev"
>         }
>     },
>     "dependent_plugins": {}
> }
> {code}
> Notice that `config_munge.files` is empty. This is a major regression as plugins using this feature don't work at all sometimes even preventing the `deviceready` event to be triggered.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org