commit | f820a57655a3b5712825de91bf9d95b9d88e84bf | [log] [tgz] |
---|---|---|
author | Yohann Roussel <yroussel@google.com> | Wed May 31 20:25:51 2017 +0200 |
committer | Yohann Roussel <yroussel@google.com> | Wed May 31 20:25:51 2017 +0200 |
tree | fccd747374738a0899f01def3e9345551f7ec9a0 | |
parent | 76bd52335b8bb4a647c5adea3b913dbf35c4fe66 [diff] |
Add support for tracing main dex classes in R8 In addition to the given main dex list, allow to handle tracing rules for calculating the list of classes required to be kept in the main dex regarding legacy MultiDex constraints. Main dex list and constraints tracing are not excliusive, when both are provided their class lists are just merged. Runtime annotations with enum values are taken into account precisely (if classpath is complete) and Annotations without enum are not forced into the main dex so as classes annotated by them. In this first step support is only added to R8. In R8, When tree shaking and legacy main dex tracing are enabled together, the assumption is made that tree shaking is keeping every classes with code involved in secondary dex files installation. This allows to let tree shaking reuse the tracing made for the main dex list instead of restarting from scratch. This change also introduces CompilationResult as an internal result allowing easier inspection by tests. CompilationResult is not returned by public R8/D8 methods. Sources of new multidex tests are modified versions of some Jack tests. Bug: 37772111 Change-Id: I7b741ace5a990a66cd4b991197de409c795e7d95
The R8 repo contains two tools.
D8 is a dexer that converts java byte code to dex code.
R8 is a java program shrinking and minification tool.