[ https://issues.apache.org/jira/browse/CB-14163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16529230#comment-16529230 ]
ASF GitHub Bot commented on CB-14163: ------------------------------------- merrygobyebye opened a new pull request #236: CB-14163 URL: https://github.com/apache/cordova-plugin-file/pull/236 # 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](http://cordova.apache.org/contribute/issues.html) 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. ---------------------------------------------------------------- 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: us...@infra.apache.org > Use cdvPluginPostBuildExtras instead of ext.postBuildExtras > ----------------------------------------------------------- > > Key: CB-14163 > URL: https://issues.apache.org/jira/browse/CB-14163 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-plugin-file > Reporter: Eric Fisher > Priority: Minor > Labels: Android > > Cordova Plugins should use {{cdvPluginPostBuildExtras}} > ([https://github.com/apache/cordova-android/blob/e9750b5cabe70b1fc9abfad28fd1239d9b9415c2/bin/templates/project/app/build.gradle#L90)] > to have code run at the end of the build gradle script instead of > {{ext.postBuildExtras}} > ([https://github.com/apache/cordova-android/blob/e9750b5cabe70b1fc9abfad28fd1239d9b9415c2/bin/templates/project/app/build.gradle#L321]). > When multiple plugins use {{ext.postBuildExtras}}, each plugin will > overwrite the previous plugin's assignment of it. The offending line of code > in this plugin is here: > [https://github.com/apache/cordova-plugin-file/blob/5e12b5e9f63b12aef5198e9a72ac8d7b8e834442/src/android/build-extras.gradle#L19]. > > Additionally, {{plugin.xml}} does not contain a reference to the > {{build-extras.gradle}} file, e.g. {{<framework > src="src/android/build-extras.gradle" custom="true" > type="gradleReference"/>}}. If it is not needed, then removing the > {{build-extras.gradle}} file is another option. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org