-
-
Notifications
You must be signed in to change notification settings - Fork 375
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
Follow up Android Support Bounties (3000USD) #3868
Comments
Its Been a week since this issue raised, PS: Working on App Bundle Fixture... |
# Pull Request Added Android Bundle Support (with alot of updation in Android App Build Process) Fixes: #3868 ## Description The new `AndroidAppBundle` module adds support for Android app bundles, extending `AndroidAppModule`. An example of the bundle process is now available in `JavaLib`. `AndroidAppModule` and `AndroidSdkModule` have been updated to support Android resources and the `aapt2` tool. Additionally, resource support has been added to the `JavaLib` and `KotlinLib` examples. ## Related Issues - Link to related issue #3868. ## Checklist - [x] New Module AndroidAppBundle (for adding android bundle support extends AndroidAppModule) - [x] New Example for Android Bundle Process (Currently under JavaLib) - [x] Updated AndroidAppModule(added resource support) - [x] Updated AndroidSdkModule(related to Android aapt2 Tool) - [x] Updated JavaLib and KotlinLib Android Examples (added resources support) ## Further Addition Requires @lihaoyi Review for code satisfaction and then further move to Documentation Part(for Build.mill files(updations))
Reopening this since the linked PR only fixes the first bullet |
## Part of Android support ### Relevant issues: - #3868 - #3550 ### Outline - Follow android studio + gradle standard for directory structure - Unit test support (local runs - no android device needed) - Integration test support (android tests, needs an android device/emulator) ### New features - Ability to install an apk in the default available android device (tested against AVD) - Ability to run all integration tests with the install command (android manifest with instrumentation is needed, this needs to be a functionality of integration tests support in the future instead) - Classpath resolution (runtimeDependencies) for packaging with dependencies and user's source code (tested against integration test and running the android app itself via the emulator) - Special classpath resolution and packaging for android tests (integration tests) - Mill integrates with avdmanager, adb and emulator to automate the run of integration tests by creating virtual devices and controlling the emulator (start, stop). Examples are added in documentation of both kotlin and java app. This includes the ability to use different emulators for different apps, by specifying identifiers and ports, though this use case should be rare in app development lifecycles. - Github actions & mill support to run integration tests in (headless) emulator & differentiate from local mode (windowed emulator + default gpu settings) ### Github actions A sample repo to demonstrate what's needed to run the emulator https://github.com/vaslabs-ltd/test-android-emulator In the end what slowed me down was that for github actions, the AVD home env var was needed, which wasn't obvious until I've tested it in isolation . All the flags and kvm configs are also needed and it's what https://github.com/ReactiveCircus/android-emulator-runner does ### Stubs and missing features An effort was made to standardise the structure faster, so follow up PRs will not use a non-standard structure. Things that are working but not "production ready" are: 1. Integration tests debug apk: This inherits the current apk construction, debug functionality needs to be added and separated from the release androidApk task 2. No testOnly for integration tests: this is easy to do, but was not added in the interest of not increasing the size of the PR and the testing surface 3. Classpath resolution: For kotlin, jvm specific dependencies are removed in a hardcoded way. 4. Desugaring: This shows as a warning in the android tests apk creation, while the flow works, the d8 will need to be configured to desugar annotations properly. 5. Emulator CI mode only recognises github actions ### Demo #### Running android tests https://github.com/user-attachments/assets/0cb47ac7-32ff-4d5c-a678-11cd18807b10 --------- Co-authored-by: irodotos7 <irodotos@vaslabs.io>
Working on Build Variants (if any conflict then please let me know) |
Linking the comment in the PR description which may be useful for the future work: #4188 (comment) |
@himanshumahajan138 Implementing build variants before Android lib modules support is implemented is not quite handy, because if there is app module declaring variants + lib module declaring variants and app module is using lib module, then there comes a question of variants matching between the two, which will impact the overall API. Also it is the most complex task from the list above because of the dynamic nature (at least in AGP) of the variants declaration rather than the static one. |
@0xnm actually i was reading docs regarding this so i thought to work on this but now came to know about its complexity i will move to implement missing parts for this bullet point Thanks for Suggestion ✨ |
From the maintainer Li Haoyi: I'm putting a 3000USD bounty on this issue, payable by bank transfer on a merged PR implementing this.
This is a follow up issue to #3550, to further flesh out Android support in the Mill build tool. The goal is to cover a variety of use cases that are common in Android development, beyond simple hello-world applications
The text was updated successfully, but these errors were encountered: