cordova-plugin-file
cordova-plugin-file copied to clipboard
fix(android): Use cdvPluginPostBuildExtras instead of ext.postBuildExtras (CB-14163)
Use cdvPluginPostBuildExtras instead of ext.postBuildExtras
Platforms affected
Android
What does this PR do?
- Adds a reference to the
build-extras.gradlefile inplugin.xmlso that the code inbuild-extras.gradlewill run with the main Cordovabuild.gradle. - Replaces incorrect usage of
ext.postBuildExtraswith usage ofcdvPluginPostBuildExtras.
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.
Run current tests
CI: Once more please.
is this change needed? I am curious if I should be running the code defined in the build-extras.gradle file
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).
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