Refactoring resource and class kinds.

Changing resource kind to represent resource's content
rather than what resource is used for. Currently we only
supprt two resource kinds: DEX file and Java class file.

Moving what used to be a resource kind into a separate enum
ClassKind representing if the class is program, classpath
or library class.

With this change, resources only represent their content as
stream and their kinds, and only are mapped into class kinds
based on the API used to introduce them to AndroidApp.

Interface Resource and class InternalResource are also merged
into one class Resource since after we made getClassDescriptors()
part of public API, there is no 'hidden' resource API.

NOTE: Resource class is also used internally to represent other
file kinds (e.g. proguardMap, etc...), we use `null` kind for
such resources.

BUG=

Change-Id: I97df13f28531d1b3086e2929ffd85fdeb2298e81
28 files changed
tree: a86d6e30d2957f0f084dd84ec11a7d3ce86a6222
  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.