apache / cordova-plugman

Apache Cordova Plugman
https://cordova.apache.org/
Apache License 2.0
400 stars 151 forks source link

`create` with plugin IDs with `-` generates invalid `clobbers` #121

Open janpio opened 5 years ago

janpio commented 5 years ago
plugman create --name cordova-plugin-math --plugin_id cordova-plugin-math --plugin_version 0.0.1

leads to

<clobbers target="cordova.plugins.cordova-plugin-math" />

which is invalid.


Fixing manually to cordova.plugins.math or similar fixes the issue.

raphinesse commented 5 years ago

You gave an invalid ID. plugman should probably validate it and throw an error.

janpio commented 5 years ago

Why did I give an invalid ID? cordova-plugin-math is similar to cordova-plugin-device and the IDs of our other plugins.

raphinesse commented 5 years ago

You did not. Sorry, my fault. I confused it with the id in config.xml which has to be a valid identifier for all relevant platforms (i.e. a valid Java class name for Android). Those usually cannot contain -.

However, plugman actually uses the name property for the clobbers target. Which is quite funny, since that could also include spaces and whatnot.

janpio commented 5 years ago

ID being two different things for projects and plugins is confusing.

+1 for getting rid of create here and replacing it with a template repo and some documentation/instructions...