cordova-plugin-spec icon indicating copy to clipboard operation
cordova-plugin-spec copied to clipboard

Define how library projects are supported in plugins

Open wildabeast opened this issue 11 years ago • 2 comments

Example of a plugin with a Library Project: https://github.com/phonegap/phonegap-plugins/tree/master/Android/BarcodeScanner

Possible solutions:

  1. 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.
  2. 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.

wildabeast avatar Oct 15 '12 20:10 wildabeast