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 2018/11/13 22:36:57 UTC

[GitHub] brodybits opened a new pull request #550: Fix for old plugins with non-Java sources (GH-547)

brodybits opened a new pull request #550: Fix for old plugins with non-Java sources (GH-547)
URL: https://github.com/apache/cordova-android/pull/550
 
 
   ## Proposed changes
   
   - Unit tests to cover GH-547 for AIDL, AAR, JAR, and `.so` file with old target-dir scheme (cordova-android pre-7.0)
   - Cleanup `getInstallDestination` function in `pluginHandlers.js`
   - Fix mapping of AIDL files in `src` subdirectory
   - Fix mapping of AAR, JAR, and `.so` files in `libs` subdirectory
   
   The proposed changes will be rebased along with PR #542 (fix for GH-540) on 7.1.x if accepted.
   
   ## Testing
   
   ### npm test
   
   - [x] `npm run unit-tests` passes
   - [ ] `npm test` passes on  Travis CI
   - [ ] `npm test` passes on AppVeyor CI
   
   ### cordova-sqlite-storage 2.1.5
   
   `cordova-sqlite-storage@2.1.5` has old JAR and `.so` target-dir scheme, which does not work on cordova-android@7.0.0 (I already make a workaround in `cordova-sqlite-storage@2.2.0`). But `cordova-sqlite-storage@2.1.5` works on `https://github.com/brodybits/cordova-android#gh-547-bugfix` with the proposed bug fix.
   
   How tested in clone of <https://github.com/brodybits/cordova-sqlite-test-app>:
   * `cordova plugin add cordova-sqlite-storage@2.1.5`
   * `cordova platform add https://github.com/brodybits/cordova-android#gh-547-bugfix`
   * Able to build and run on a test device
   * Click on self test button results in an alert that the self test is OK (self test of SQLite CRUD operations in sqlite plugin)
   * `cordova plugin remove cordova-sqlite-storage` is successful
   
   ### cordova-plugin-purchase v7.1.0
   
   This `cordova-plugin-purchase` version has AIDL & XML files with old target-dir scheme, does not work on cordova-android@7.0.0. They had to do some ugly workarounds to work on both cordova-android@6 and cordova-android@7.
   
   How tested in a new Cordova project:
   
   * `cordova plugin add https://github.com/j3k0/cordova-plugin-purchase#v7.1.0 --variable BILLING_KEY="MIIB...AQAB"`
   * `cordova platform add https://github.com/brodybits/cordova-android#gh-547-bugfix`
   * `cordova build android` is successful
   * `cordova plugin remove cc.fovea.cordova.purchase` is successful
   
   ### cordova-plugin-hikvisionVedio
   
   <https://github.com/dylearning/cordova-plugin-hikvisionVedio> fails to build on cordova-android@7.1.2 since its JAR files as specified in `source-file` elements not installed in the right place.
   
   How tested in a new Cordova project:
   
   * `cordova plugin add https://github.com/dylearning/cordova-plugin-hikvisionVedio`
   * `cordova platform add https://github.com/brodybits/cordova-android#gh-547-bugfix`
   * `cordova build android` is successful
   * `cordova plugin rm cordova-plugin-hikvisionVedio` is successful
   
   ## Quirk
   
   JAR library files are mapped into `app/lib` subdirectory, while `.so` (NDK) library files are mapped into `app/src` subdirectory. I wonder if there is an easy way to resolve this inconsistency.
   
   I think we should encourage plugins to use `lib-file` instead of `source-file` for AAR, JAR, and `.so` files, and add a deprecation message in case mapping of these library files is needed. I hope to propose this change in the near future.
   
   ## Next steps
   
   - [ ] Rebase this fix along with PR #542 (GH-540) on 7.1.x for upcoming 7.1.3 patch release
   - [ ] Tests should be renumbered in handlers.spec.js, maybe with suffix letters like they did in cordova-windows for greater future flexibility
   - [ ] Add a deprecation message in case of mapping of library files as described above

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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