Determining if recursive Gradle references need to be added to the apk

I’m working on adding Dropbox support to my Android app, which is quickly becoming an adventure in Package Reference land. Using GradleReferences (which are a fantastic feature) I added the dropbox-core-sdk library. Everything compiled fine, but at runtime I got a ClassNotFoundException (CNF) on a class in okhttp library, which is used by the dropbox library. I added this reference manually and got a CNF on okio, which is used by okhttp. Then I got a CNF on kotlin-stdlib, which is used by okio. I added this and got a CNF jackson-core, which is also used by Dropbox.

At the moment everything seems to be working in my project, but it is a huge headache to manually track down and add all of the recursive dependencies for a large library like the Dropbox API, which has about a 32k method count. Is there any way that EBuild could detect which jars/classes need to be copy-localed into the apk?

Hmm. CopyLocal should propagate down into indirect package references. Do you have copyLocal set on the dropbox-core-sdk reference?

Actually, oops, turns out that did not happen (I must ave fixed that for NuGet packages, a while back, but not for Gradle. fixed now — I can send you a new build later today (you work on Mac or Windows?).

That would be great - I work on Windows. Thanks!

1 Like

New build is up; please let me know if all gets packaged up correctly now even without you adding the indirect dependencies directly. thanx!

1 Like

Working great, thanks!

Glad to hear!