-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pre-release] Statically linking fails with custom styles that depend on resources in an aar #39
Comments
Thanks for the detailed report.
Can you try this and see if it works? |
@ahumesky The usage of You can read more about this specific attribute here. But the idea extends to many other attributes too. The support libraries rely on creating these app-name spaced attributes pretty heavily to backport new platform features, so avoiding I think the fact that |
Thanks for the details here. Using the native android rules (i.e. the built-in / non-starlark rules), an app with One thing to note is that
And further, looking at the providers of native aar_import for appcompat:
vs starlark aar_import:
So that means that starlark android_library + native aar_import also doesn't work (while native aar_import works with native android_library), and so perhaps there's something missing in android_library too. (On the other hand, it's not clear that we really need to support this mix of native and starlark rules). We'll go through the code to see what the disconnect is. |
@ahumesky I did some digging yesterday afternoon to try to figure out what's going on here. We found a few things:
|
I think I found another reason this is not working: a chunk of code in aar_import related to resource processing is not being exported to github, because that code relies on other parts of the native android rules in bazel that haven't been open sourced. We may need to refactor this part of resource processing, and that might take a bit of time to work through. |
Hi, do we have an approximate expected time for pre-alpha to be officially merged into master? Currently we encountered some problems when building Android app with bazel. Like #314 bazelbuild/bazel#11497 seems the starlark version Is there anything we can do to help speed up the process? Thanks. |
We did another round of testing against the data bindings patches with the alpha branch of rules_android. We got further but hit a new failure case where custom styles that references Android resource attributes provided by 3rd party dependencies aren't being found during static linking.
Tested using
rules_jvm_external
andbazel
HEAD.Original report: bazelbuild/bazel#11497 (comment)
BUILD
res/values/styles.xml
The text was updated successfully, but these errors were encountered: