You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is because, currently, the aar output of android_library contains the output of only that target, not the transitive closure: http://www.bazel.io/docs/be/android.html#android_library_implicit_outputs
Additionally, if you had an android_library A depend on an android_library B, the aar of A will not contain anything from B. We'd like to make it possible to output the transitive closure for the aars, but there are resource processing issues, and we won't likely get to it for a while.
You might be able to get pretty far by wrapping the android_library in an android_binary rule, then using the _deploy.jar implicit output of android_binary to get the classes.jar, and extracting the native libs and resources and assets from the apk, and putting that together in a genrule or a skylark rule. The tricky part is getting R.txt and the AndroidManifest, because those are not implicit outputs of andorid_binary. R.txt is an implicit output of android_library, but I don't think it's going to include transitive dependencies. You might have to write a wrapper script that will take the right things out of bazel-bin and assemble the aar.
ahumesky
added
P2
We'll consider working on this in future. (Assignee optional)
and removed
P3
We're not considering working on this, but happy to review a PR. (No assignee)
labels
Dec 8, 2016
Bazel version: 0.2.3
If I change the
android_library
toandroid_binary
, then the generated apk contains the so file without any problem.The text was updated successfully, but these errors were encountered: