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

Gradle 'provided' not excluding dependancy from runtime

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: cordova-android
    • Labels:

      Description

      I've created a build-extras.gradle to compile a 3rd party .jar dependancy into my application. This 3rd party .jar dependancy exists on the android device under systems/framework so I need to only compile it, but not provide it at run time (otherwise I get DEX issues because 2 identical .jar files exist at runtime).

      I've confirmed the .jar dependancy is compiled AND included in the apk file deployed to the android device using "dependancies

      { provided files('my-file.jar') }

      " in the build-extras.gradle file. Using android studio and a non-cordova based project i've used the same syntax (provided) and the my-file.jar was compiled BUT NOT included in the apk...thus it worked.

      Why isn't 'provided' working the same way it works on a non-cordova android project? And is there another way to get a .jar dependancy compiled but NOT included in the final apk file?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              reidsteven75@gmail.com Steven Reid
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: