Hello Cordova devs,

I'm Jean-Christophe Hoelt, author of the Cordova "In-App Purchase" plugin for iOS/Android/Windows (cordova-plugin-purchase).


cordova-android's recently had issues with file paths during plugin installation. A clean solution to the issue will require introducing breaking change in the `plugin.xml` file with the next major release.

As a plugin author, I'd like to discuss a simple change to structure of `plugin.xml` that should make things more flexible for us, plugins authors, who like to support multiple version of cordova.


I explained my suggestion on GitHub and was advised to raise the issue on the mailing list.

https://github.com/apache/cordova-android/issues/585


I copy the core idea below.

---

Has it been ever considered to allow multiple `<platform>` tags with version 
filters?

Here is a short demo of what I mean in a plugin description file:

```xml
<plugin ...>
 <platform type="android" version="<8.0.0">
   ...
   <source-file src="src/android/ILib.aidl" 
target-dir="src/com/android/vending/billing" />
   ...
 </platform>
 <platform type="android" version=">=8.0.0">
   ...
   <lib-file src="src/android/ILib.aidl" />
   ...
 </platform>
 <platform type="android" version="*">
   ... common stuff ...
 </platform>
</plugin>
```

Note: `version="*"` should be optional, thus keeping compatibility with plugins that do not make use of the feature.

---

Best regards,

JC

Reply via email to