Lazy class loading with resource providers.

Extending the current lazy loading implementation to allow API
consumer to pass instances implementing LazyResourceProvider
interface as a source of resources that can be queried lazily
for on-demand class searches.

Only class files can be added this way in this implementation.

This functionality is currently implemented as an *extension*
of regular lazy loading which is based on DexClassPromise and
LazyClassFileLoader, and reuses this implementation a lot.

The advantage of using lazy resource providers is that it does
not require actually having all the resources preloaded up front,
but it comes at cost of minor differences of how errors for
conflicting classes are reported in resource-provider based
and regular scenarios.

Currently all the resources added to D8 via --lib or --classpath
are still loaded via regular lazy loading mechanism, resource
providers are only available for API users.

BUG=

Change-Id: I70cba6f3603bfd1e8e33a168d5fd8a3000a6e762
17 files changed
tree: 2a5bb5702d1460d810fe5b3473559bea915b4065
  1. buildSrc/
  2. scripts/
  3. src/
  4. tests/
  5. third_party/
  6. tools/
  7. .gitignore
  8. AUTHORS
  9. build.gradle
  10. codereview.settings
  11. CONTRIBUTING.md
  12. copyAdditionalJctfCommonFiles.gradle
  13. LICENSE
  14. README.md
README.md

The R8 repo contains two tools.

  1. D8 is a dexer that converts java byte code to dex code.

  2. R8 is a java program shrinking and minification tool.