-
-
Notifications
You must be signed in to change notification settings - Fork 421
Android/r8 optimization #4743
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
Android/r8 optimization #4743
Conversation
|
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:
|
|
This is WIP |
...ndroid/javalib/5-R8/app/src/androidTest/java/com/helloworld/app/ExampleInstrumentedTest.java
Show resolved
Hide resolved
4da3514 to
7d172cb
Compare
lefou
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you doubled almost all tasks from AndroidAppKotlinModule to support a release and a debug build. I wonder if it would make more sense to just create two instances of the module, one for release and one for debug?
I spoke with @vaslabs, and he also agreed to leave it for now as it is and on future PRs we will clean up whatever is needed |
I need to double check if there's something excessive, but in general I'd prefer the duplication for now until things become more stable |
| PathRef(aarFile) | ||
| } | ||
|
|
||
| def androidDebugdAar: T[PathRef] = Task { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
| os.call(signArgs) | ||
|
|
||
| PathRef(signedApk) | ||
| androidReleaseLibsRClasses() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't make much sense semantically, why would generatedSources point to a release (or debug) mode . Why do we need to specify Release or Debug mode for androidLibsRClasses?
|
ok, I think I made a mistake to push for a release/debug separation within this PR, I'll give you a call @irodotos7 to split this into more digestible steps |
A step back from this PR #4743 I created a smaller, clear PR with the R8 task only and without the separation of Debug and Release Install paths ## Motivation As part of Mill’s Android integration, we want to use the R8 optimization tool to create smaller dex files   ## Provided in this PR 1) Run the R8 task which will shrink the dex files according to the proguard rules
|
@irodotos7 we don't need this PR as the work has been done in #4996 and #4892 , you can close it |
DONT MERGE
Motivation
As part of Mill’s Android integration, we want to use the R8 optimization tool to create smaller dex files
Provided in this PR
Ability to choose whether to install the apk in release or debug mode ( the
isDebugno longer exists). We have 2 paths to choose from. We can choose betweenandroidReleaseApk,androidReleaseInstall, or theandroidDebugApk,androidDebugInstall.Fixed the CI Android action
Refactoring
Apart from the
isDebugthat was removed, I also moved some methods from androidAppModule to androidModule