Omit module-info.class when unzipping jar files.

During the Android build process, multiple .jar files are
unzipped into the same directory. If the .jar is an OpenJDK 9
modular jar (with a module-info.class in the root directory),
the last module-info.class extracted will overwrite any earlier
module-info.class files extracted, and will cause all extracted
class files to be considered part of that module.

Therefore, this would break compilation under OpenJDK 9 (with
-target 1.9 -source 1.9). This CL fixes this by omitting the
module-info.class file (if present) when extracting the .jar.

This essentially turns any modular jar into a regular jar,
replacing the module with corresponding classes on the classpath.
This is sufficient for now because Android does not currently
support module dependencies.

Test: Treehugger
Bug: 38177569
Change-Id: Ia184e64d2f24b8ca79aeab1c00bd5da0386530bf
1 file changed