Skip to content

Commit

Permalink
Explicitly provide the encoding (flutter#27851)
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmanuel Garcia authored Aug 2, 2021
1 parent 76382d5 commit 9741683
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tools/androidx/generate_pom_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,19 @@
</metadata>
'''

def utf8(s):
return str(s, 'utf-8') if isinstance(s, (bytes, bytearray)) else s

def main():
with open (os.path.join(THIS_DIR, 'files.json')) as f:
dependencies = json.load(f)

parser = argparse.ArgumentParser(description='Generate the POM file for the engine artifacts')
parser.add_argument('--engine-artifact-id', type=str, required=True,
parser.add_argument('--engine-artifact-id', type=utf8, required=True,
help='The artifact id. e.g. android_arm_release')
parser.add_argument('--engine-version', type=str, required=True,
parser.add_argument('--engine-version', type=utf8, required=True,
help='The engine commit hash')
parser.add_argument('--destination', type=str, required=True,
parser.add_argument('--destination', type=utf8, required=True,
help='The destination directory absolute path')
parser.add_argument('--include-embedding-dependencies', type=bool,
help='Include the dependencies for the embedding')
Expand Down

0 comments on commit 9741683

Please sign in to comment.