You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/07/11 18:03:11 UTC
[GitHub] [cordova-docs] janpio commented on issue #1004: Cordova v9.0.0 no longer uses plugins in the config.xml – not reflected in docs
janpio commented on issue #1004: Cordova v9.0.0 no longer uses plugins in the config.xml – not reflected in docs
URL: https://github.com/apache/cordova-docs/issues/1004#issuecomment-510591868
For plugins this is not actually true.
I ran `cordova platform add android` on a Phonegap Build project that only has `www` and `config.xml`:
```
C:\Users\Jan\Downloads\tt (master -> origin)
λ ls
config.xml www/
C:\Users\Jan\Downloads\tt (master -> origin)
λ cordova platform add android
Using cordova-fetch for cordova-android@^8.0.0
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms\android
Package: com.foo.android
Name: foo
Activity: MainActivity
Android target: android-28
Subproject Path: CordovaLib
Subproject Path: app
Android project created with cordova-android@8.0.0
Plugin 'cordova-plugin-splashscreen' found in config.xml... Migrating it to package.json
Plugin 'cordova-plugin-statusbar' found in config.xml... Migrating it to package.json
Plugin 'cordova-plugin-whitelist' found in config.xml... Migrating it to package.json
Plugin 'cordova-plugin-email-composer' found in config.xml... Migrating it to package.json
Plugin 'cordova-plugin-googlemaps' found in config.xml... Migrating it to package.json
Discovered saved plugin "cordova-plugin-splashscreen". Adding it to the project
Installing "cordova-plugin-splashscreen" for android
Adding cordova-plugin-splashscreen to package.json
Discovered saved plugin "cordova-plugin-statusbar". Adding it to the project
Installing "cordova-plugin-statusbar" for android
Adding cordova-plugin-statusbar to package.json
Discovered saved plugin "cordova-plugin-whitelist". Adding it to the project
Installing "cordova-plugin-whitelist" for android
This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.
Adding cordova-plugin-whitelist to package.json
Discovered saved plugin "cordova-plugin-email-composer". Adding it to the project
Installing "cordova-plugin-email-composer" for android
Subproject Path: CordovaLib
Subproject Path: app
Adding cordova-plugin-email-composer to package.json
Discovered saved plugin "cordova-plugin-googlemaps". Adding it to the project
Installing "cordova-plugin-googlemaps" for android
Failed to install 'cordova-plugin-googlemaps': CordovaError: Using "requireCordovaModule" to load non-cordova module "fs" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.
C:\Users\Jan\Downloads\tt (master -> origin)
λ ls
config.xml node_modules/ package.json package-lock.json platforms/ plugins/ www/
C:\Users\Jan\Downloads\tt (master -> origin)
λ cat package.json
{
"devDependencies": {
"cordova-plugin-email-composer": "^0.8.15",
"cordova-plugin-googlemaps": "^2.4.6",
"cordova-plugin-splashscreen": "^5.0.3",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3"
},
"cordova": {
"plugins": {
"cordova-plugin-splashscreen": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-email-composer": {},
"cordova-plugin-googlemaps": {}
},
"platforms": [
"android"
]
}
}
```
Note how it recognized the plugins in `config.xml` and put them in `package.json` (which it also created from scratch).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org