Skip to content

Commit 9741683

Browse files
author
Emmanuel Garcia
authored
Explicitly provide the encoding (flutter#27851)
1 parent 76382d5 commit 9741683

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tools/androidx/generate_pom_file.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,19 @@
6363
</metadata>
6464
'''
6565

66+
def utf8(s):
67+
return str(s, 'utf-8') if isinstance(s, (bytes, bytearray)) else s
68+
6669
def main():
6770
with open (os.path.join(THIS_DIR, 'files.json')) as f:
6871
dependencies = json.load(f)
6972

7073
parser = argparse.ArgumentParser(description='Generate the POM file for the engine artifacts')
71-
parser.add_argument('--engine-artifact-id', type=str, required=True,
74+
parser.add_argument('--engine-artifact-id', type=utf8, required=True,
7275
help='The artifact id. e.g. android_arm_release')
73-
parser.add_argument('--engine-version', type=str, required=True,
76+
parser.add_argument('--engine-version', type=utf8, required=True,
7477
help='The engine commit hash')
75-
parser.add_argument('--destination', type=str, required=True,
78+
parser.add_argument('--destination', type=utf8, required=True,
7679
help='The destination directory absolute path')
7780
parser.add_argument('--include-embedding-dependencies', type=bool,
7881
help='Include the dependencies for the embedding')

0 commit comments

Comments
 (0)