-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Feature Request: Add native support for Android App Bundles / Dynamic Delivery #11497
Comments
Seems like this is going to be very important come this August, as without this you can't publish to the play store: https://android-developers.googleblog.com/2020/11/new-android-app-bundle-and-target-api.html |
I asked about this issue on bazel discuss and didn't get anything back: https://groups.google.com/g/bazel-discuss/c/z8Z3-tLcaCI/m/TCKUppYHBQAJ |
Hi all, Our approach to solving this issue is for us to provide a rule called If you would like to switch to using
We'll publish additional documentation and examples when we publish the |
@ahumesky How would this work for generating APKs from AAB files? Would we need to use bundletool or keep |
Good question. Yes, you'd keep Also, android_application will support It should also be possible to invoke bundletool in a genrule that depends on the android_application and specifies the configuration you want for the APK. |
@ahumesky any target when |
@ajanuar I aim to publish at least a preview of the code later this week or next week. |
Any update? |
I have the code for android_application working and building bundles (for at least a very simple app), and I think we'll have everything in position to publish a preview tomorrow (i.e. to the pre-alpha branch), but there's a chance that might slip to Monday |
Hi all, I've published the preview to the pre-alpha branch here: Note that to get the bundletool dependencies, you'll need to add
|
Thanks Alex! I am glad to see that and am looking forward to seeing how this evolves. I hope that this is useful for people. Has anyone tried it yet? |
One more note on how to use these, the starlark code relies on some features and other changes in bazel that haven't been released yet, but should be in the next rolling release (#13505). (otherwise something like |
Are those changes able to be cherry-picked into 4.2.0? |
Good question, I'm not sure. The immediate error is from refactorings to the Java rules, so I'm not sure off-hand what it would take to cherry pick those. In general though, the Android rules are being developed internally against head, and then exported here, so for the time being the Android rules will need a fairly recent version of Bazel. |
Has anyone had a chance to try building a bundle with android_application? |
Thanks for testing this, I'll post an update on that issue. |
See #11497 (comment) #12780 RELNOTES: None PiperOrigin-RevId: 387460397
…attributes class_infos and setter_stores from lists to depsets. See bazelbuild/bazel@876d48d bazelbuild/bazel#11497 (comment) bazelbuild/bazel#12780
…attributes class_infos and setter_stores from lists to depsets. (#38) See bazelbuild/bazel@876d48d bazelbuild/bazel#11497 (comment) bazelbuild/bazel#12780
@ahumesky 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
|
Thanks for testing this out. I was able to repro the problem with the style resource, could you file an issue about this? I'll investigate from there. |
@ahumesky moved the issue over to here bazelbuild/rules_android#39 |
FYI with help from @ahumesky I ended up rebuilding a minimalistic version of android_application for my team that works with Bazel 4.0 since we were having some difficulty getting the new rules_android changes working. Feel free to take a look if it's helpful: oppia/oppia-android#3750. Note that there's a bunch of extra stuff in there, but folks in this thread will probably be specifically interested in: https://github.com/oppia/oppia-android/blob/d7945d56de9fd7a1ad7ff131953de296ffcf35cd/oppia_android_application.bzl. I tried to build this in a way that would be easily swappable with rules_android once it's ready. |
Hello, are there any updates to this aab support? It has been 3 months since last update. Are folks with APKs migrating off Bazel or simply waiting for the bazel |
We've been using https://github.com/oppia/oppia-android/blob/develop/oppia_android_application.bzl successfully to build aabs |
@rockwotj Thanks for the link. I am using a modified version of the
I am on bazel version |
@ya332 you should re-run the command with sandbox_debug and verbose_failures to see what the specific sandbox command is that went wrong (you should be able to re-run that specific command and produce the same failure, plus the sandbox directories will stick around with sandbox_debug so you can inspect them to figure out what's going wrong). |
See bazelbuild/bazel#11497 (comment) bazelbuild/bazel#12780 RELNOTES: None PiperOrigin-RevId: 387460397
A minimal |
Description of the problem / feature request:
Add the ability to build and publish Android APKs using the new App Bundles / Dynamic Delivery android features. See:
https://developer.android.com/platform/technology/app-bundle
https://developer.android.com/guide/app-bundle/dynamic-delivery
Feature requests: what underlying problem are you trying to solve with this feature?
Use Bazel with App Bundles / Dynamic Delivery
What operating system are you running Bazel on?
MacOs or Linux
What's the output of
bazel info release
?Any
Have you found anything relevant by searching the web?
https://developer.android.com/platform/technology/app-bundle
https://developer.android.com/guide/app-bundle/dynamic-delivery
The text was updated successfully, but these errors were encountered: