cordova-plugin-spec
cordova-plugin-spec copied to clipboard
Define how library projects are supported in plugins
Example of a plugin with a Library Project: https://github.com/phonegap/phonegap-plugins/tree/master/Android/BarcodeScanner
Possible solutions:
- Plugin devs must pre-build the Library Project as a jar. Note that if the library project has resources, they won't be accessible in the jar (limitation of library projects). The resources will have to be installed to the 'parent' project, and the Library Project's code will have to be changed to access the 'parent' resources by using Resources.getIdentifier.
- Update the spec (and any tools i.e. pluginstall) to support linking Library Projects. This task would (likely) copy the LibraryProject to a sub-directory of the 'parent' project, and write the reference to the project.properties file:
android.library.reference.1=./LibraryProject
.