@@ -512,6 +512,10 @@ def add_parser(subparsers, *args, **kwargs):
512
512
'--add-asset' , dest = 'assets' ,
513
513
action = "append" , default = [],
514
514
help = 'Put this in the assets folder in the apk.' )
515
+ parser_packaging .add_argument (
516
+ '--add-resource' , dest = 'resources' ,
517
+ action = "append" , default = [],
518
+ help = 'Put this in the res folder in the apk.' )
515
519
parser_packaging .add_argument (
516
520
'--private' , dest = 'private' ,
517
521
help = 'the directory with the app source code files' +
@@ -1000,6 +1004,13 @@ def _fix_args(args):
1000
1004
asset_src = asset_dest = asset
1001
1005
# take abspath now, because build.py will be run in bootstrap dir
1002
1006
unknown_args += ["--asset" , os .path .abspath (asset_src )+ ":" + asset_dest ]
1007
+ for resource in args .resources :
1008
+ if ":" in resource :
1009
+ resource_src , resource_dest = resource .split (":" )
1010
+ else :
1011
+ resource_src = resource_dest = resource
1012
+ # take abspath now, because build.py will be run in bootstrap dir
1013
+ unknown_args += ["--resource" , os .path .abspath (resource_src )+ ":" + resource_dest ]
1003
1014
for i , arg in enumerate (unknown_args ):
1004
1015
argx = arg .split ('=' )
1005
1016
if argx [0 ] in fix_args :
0 commit comments