secondary-dex-gradle

Additional

Language
Java
Version
N/A
Created
May 18, 2014
Updated
Apr 18, 2017 (Retired)
Owner
Mohit Kanwal (creativepsyco)
Contributors
BtM909
Mohit Kanwal (creativepsyco)
2
Activity
Badge
Generate
Download
Source code
APK file

Blurb

We modify the build.gradle files to be able to churn out the Dex file for the secondary library.

Take a look at app's build.gradle and lib's build.gradle.

We then use this and copy it into the assets folder which gets packaged into the final APK.

Once this is done, loading the dex at runtime is easy, and is explained in the blogpost.

A requirement is that both the library and the app will need to maintain a shared interface, otherwise the loading function will need to invoke methods at runtime via reflection.