-
Notifications
You must be signed in to change notification settings - Fork 525
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
[r8] update to 1.4.93 #3121
Merged
Merged
[r8] update to 1.4.93 #3121
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Testing this one, I suspect there is a problem with multidex:
From this r8 commit. Hopefully, some tests fail and show the same. Looking into it. |
dellis1972
reviewed
May 29, 2019
src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs
Show resolved
Hide resolved
dellis1972
approved these changes
May 29, 2019
Context: https://mvnrepository.com/artifact/com.android.tools/r8/1.4.93 Context: https://r8.googlesource.com/r8/+/refs/tags/1.4.93/ Updating to the latest R8, we hit a problem... In R8 1.4.93, they appear to have removed support for custom `multidex.keep` files when `minSdkVersion` >= 21. R8 decides on its own if multidex is needed, and splits up dex files appropriately. The new error message was added here: https://r8.googlesource.com/r8/+/0e5c4339df0207a0e38f11438db84b29f328f777%5E%21/ Since `r8.jar` will now abort with an error if you specify `multidex.keep` files and `minSdkVersion` >= 21. I feel all we can do in this case is add a new warning if developers specify `@(MultiDexMainDexList)` with R8--then allow R8 to calculate multidex on its own. We looked a bit, and did not find much usage of the `@(MultiDexMainDexList)` item group: https://github.com/search?q=MultiDexMainDexList&type=Code The examples of `multidex.keep` files we found, looked like they shouldn't be needed anyway. I updated the `MultiDexCustomMainDexFileList` test to check dx/d8 and API 19/21. R8 appears to create multiple dex files without any multidex rules or `multidex.keep` files.
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this pull request
Jul 19, 2019
Fixes: dotnet#3370 Context: dotnet#3121 In 34ee473, I introduced an incorrect warning if: * `android:minSdkVersion` >= 21 * `$(AndroidEnableMultiDex)` is `True` * `$(AndroidDexTool)` is `d8` We need to check if any `@(MultiDexMainDexList)` files were present before issuing the warning. r8 no longer supports custom `multidex.keep` files in some cases, so this is what the `<R8/>` MSBuild task is actually meant to warn about. I also improved the warning message a bit.
jonathanpeppers
added a commit
that referenced
this pull request
Jul 19, 2019
Fixes: #3370 Context: #3121 In 34ee473, I introduced an incorrect warning if: * `android:minSdkVersion` >= 21 * `$(AndroidEnableMultiDex)` is `True` * `$(AndroidDexTool)` is `d8` We need to check if any `@(MultiDexMainDexList)` files were present before issuing the warning. r8 no longer supports custom `multidex.keep` files in some cases, so this is what the `<R8/>` MSBuild task is actually meant to warn about. I also improved the warning message a bit.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context: https://mvnrepository.com/artifact/com.android.tools/r8/1.4.93
Context: https://r8.googlesource.com/r8/+/refs/tags/1.4.93/
Updating to the latest R8, we hit a problem...
In R8 1.4.93, they appear to have removed support for custom
multidex.keep
files whenminSdkVersion
>= 21. R8 decides on itsown if multidex is needed, and splits up dex files appropriately.
The new error message was added here:
https://r8.googlesource.com/r8/+/0e5c4339df0207a0e38f11438db84b29f328f777%5E%21/
Since
r8.jar
will now abort with an error if you specifymultidex.keep
files andminSdkVersion
>= 21. I feel all we can doin this case is add a new warning if developers specify
@(MultiDexMainDexList)
with R8--then allow R8 to calculate multidexon its own.
We looked a bit, and did not find much usage of the
@(MultiDexMainDexList)
item group:https://github.com/search?q=MultiDexMainDexList&type=Code
The examples of
multidex.keep
files we found, looked like theyshouldn't be needed anyway.
I updated the
MultiDexCustomMainDexFileList
test to check dx/d8 andAPI 19/21. R8 appears to create multiple dex files without any
multidex rules or
multidex.keep
files.