Files
Kudo Chien 5c2dfafb10 [expo-cli][dev-server] Export hbc as bundle output if js runtime is hermes (#3522)
# Why

If an app is running with hermes runtime, `expo export` for self hosting update should also generate hermes bytecode instead of plain javascript.

# How

Assuming project should setup with pre-defined shape which set the runtime in gradle.properties like expo/expo#13052.
If exporting project is running with hermes, right after calling metro to build js bundles, we should further call `hermesc` to compile hbc.
The sourcemap also needs to re-compose by metro-source-map.
The overall flow is reference from [react-native's react.gradle](https://github.com/facebook/react-native/blob/0.63-stable/react.gradle).

# Test Plan

### Unit Test

```
HermesBundler-test.ts
  parseGradleProperties
    should return array of key-value tuple (2 ms)
    should keep "=" in value if there are multiple "="
    should exclude comment (1 ms)
  getHermesBytecodeBundleVersionAsync
    should return hermes bytecode version 74 for plain.74.hbc (13 ms)
    should throw exception for plain javascript file (5 ms)
    should throw exception for nonexistent file
  isHermesBytecodeBundleAsync
    should return true for hermes bytecode bundle file
    should return false for plain javascript file
    should throw exception for nonexistent file
```

### E2E Test

```
export-test.ts
    should export hbc bundle if running with hermes (31292 ms)
```
2021-05-31 22:00:45 +08:00
..
2020-11-20 13:50:45 +01:00