-
-
Notifications
You must be signed in to change notification settings - Fork 401
Android/cleanup app release install #4996
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
base: main
Are you sure you want to change the base?
Android/cleanup app release install #4996
Conversation
4923d62
to
8bc86f5
Compare
Hi! I'm I would like to apply some automated changes to this pull request, but it looks like I don't have the necessary permissions to do so. To get this pull request into a mergeable state, please do one of the following two things:
|
adff5c0
to
fe1ef0f
Compare
fe1ef0f
to
9aeea12
Compare
Pipeline failures don't seem related, I think they're the same as in main branch |
Yeah looks not causes by this PR |
Summary
testForked.dest
R8 and Proguard
Followed similar configuration style with gradle
Although there's still work to be done in that area, if minification is enabled, we use the R8 tool to generate the dex otherwise the d8 (which also uses proguard for now) . This needs further work and clarification as AGP seems to be using R8 by default when minification is enabled, otherwise d8 is used.
Proguard default files are also fetched (as an opt-in setting) from the Android SDK directories
Build settings
I've introduced a first very minimal step for doing build variants, mainly out of necessity to manage R8 and D8 variations better, but this will be expanded once we need to fully support build variants.
The settings so far concerned the R8 use case at hand and it's a case class that has the parameters to feed proguard files and flags into R8.
R8 enhancements
Extending the work from #4892 , I've made some usability enhancements and enriched the examples to demonstrate how instrumented tests can be used alongside R8 and release builds.
I think R8 now can be fairly usable to generate minified and optimised release builds without getting in the middle of development (e.g. running tests and testing in the emulator) although more work needs to be done towards that area, but we'll follow up after we do more exploratory usability testing!
Future work
Following this work, we can move to complete the work on architecture samples by testing instrumented tests, unit tests and later on debug variants.
The cleanup also reduced a lot of duplication between
AndroidAppModule
andAndroidModule
so it will make our development efforts a bit easier to add more features!More discovery work will follow to align the instrumented test apk installation more in line with AGP