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

fix(android): Use cdvPluginPostBuildExtras instead of ext.postBuildExtras (CB-14163)

Open merrygobyebye opened this issue 7 years ago • 5 comments
trafficstars

Use cdvPluginPostBuildExtras instead of ext.postBuildExtras

Platforms affected

Android

What does this PR do?

  1. Adds a reference to the build-extras.gradle file in plugin.xml so that the code in build-extras.gradle will run with the main Cordova build.gradle.
  2. Replaces incorrect usage of ext.postBuildExtras with usage of cdvPluginPostBuildExtras.

What testing has been done on this change?

Added the modified cordova-plugin-file to a Cordova project and verified that the code in build-extras.gradle ran during the execution of the command cordova build android.

Checklist

  • [x] Reported an issue in the JIRA database
  • [x] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
  • [ ] Added automated test coverage as appropriate for this change.

merrygobyebye avatar Jul 01 '18 20:07 merrygobyebye

Run current tests

janpio avatar Jul 04 '19 11:07 janpio

CI: Once more please.

janpio avatar Jul 04 '19 17:07 janpio

is this change needed? I am curious if I should be running the code defined in the build-extras.gradle file

BrianMulhall avatar Feb 13 '20 16:02 BrianMulhall

For context, the original issue this PR addresses is on jira at https://issues.apache.org/jira/browse/CB-14163

The motivation appears to be a bug if multiple plugins are trying to use ext.postBuildExtras where one will overwrite the other (as claimed in the bug report).

breautek avatar Feb 13 '20 16:02 breautek

if the plugin.xml doesnt have the change in this pull request the build-extras.gradle wont exist in the build output. So I am really wondering if the contents of the build-extras.gradle needs to be run at all. Cause if it does then i think this change is important

BrianMulhall avatar Feb 13 '20 18:02 BrianMulhall