@@ -590,14 +590,16 @@ def parse_args(args=None):
590590 ap .add_argument ('--launcher' , dest = 'launcher' , action = 'store_true' ,
591591 help = ('Provide this argument to build a multi-app '
592592 'launcher, rather than a single app.' ))
593- ap .add_argument ('--permission' , dest = 'permissions' , action = 'append' ,
593+ ap .add_argument ('--permission' , dest = 'permissions' , action = 'append' , default = [],
594594 help = 'The permissions to give this app.' , nargs = '+' )
595- ap .add_argument ('--meta-data' , dest = 'meta_data' , action = 'append' ,
595+ ap .add_argument ('--meta-data' , dest = 'meta_data' , action = 'append' , default = [],
596596 help = 'Custom key=value to add in application metadata' )
597+ ap .add_argument ('--uses-library' , dest = 'android_used_libs' , action = 'append' , default = [],
598+ help = 'Used shared libraries included using <uses-library> tag in AndroidManifest.xml' )
597599 ap .add_argument ('--icon' , dest = 'icon' ,
598600 help = ('A png file to use as the icon for '
599601 'the application.' ))
600- ap .add_argument ('--service' , dest = 'services' , action = 'append' ,
602+ ap .add_argument ('--service' , dest = 'services' , action = 'append' , default = [],
601603 help = 'Declare a new service entrypoint: '
602604 'NAME:PATH_TO_PY[:foreground]' )
603605 if get_bootstrap_name () != "service_only" :
@@ -740,17 +742,8 @@ def _read_configuration():
740742 'deprecated and does nothing.' )
741743 args .sdk_version = - 1 # ensure it is not used
742744
743- if args .permissions is None :
744- args .permissions = []
745- elif args .permissions :
746- if isinstance (args .permissions [0 ], list ):
747- args .permissions = [p for perm in args .permissions for p in perm ]
748-
749- if args .meta_data is None :
750- args .meta_data = []
751-
752- if args .services is None :
753- args .services = []
745+ if args .permissions and isinstance (args .permissions [0 ], list ):
746+ args .permissions = [p for perm in args .permissions for p in perm ]
754747
755748 if args .try_system_python_compile :
756749 # Hardcoding python2.7 is okay for now, as python3 skips the
0 commit comments