Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-14163

Use cdvPluginPostBuildExtras instead of ext.postBuildExtras

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • cordova-plugin-file

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              merrygobyebye Eric Fisher
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m