File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -26,12 +26,16 @@ def _adjust_resources_path(path):
2626 return dir_1 + dir_2 , rel_path
2727 return "" , path
2828
29- def _build_nosrc_jar (ctx , buildijar ):
29+ def _add_resources_cmd (ctx ):
3030 res_cmd = ""
3131 for f in ctx .files .resources :
3232 c_dir , res_path = _adjust_resources_path (f .path )
3333 change_dir = "-C " + c_dir if c_dir else ""
34- res_cmd = "\n {jar} uf {out} " + change_dir + " " + res_path
34+ res_cmd += "\n {jar} uf {out} " + change_dir + " " + res_path
35+ return res_cmd
36+
37+ def _build_nosrc_jar (ctx , buildijar ):
38+ res_cmd = _add_resources_cmd (ctx )
3539 ijar_cmd = ""
3640 if buildijar :
3741 ijar_cmd = "\n cp {out} {ijar_out}" .format (
@@ -61,11 +65,7 @@ touch -t 198001010000 {manifest}
6165 arguments = [])
6266
6367def _compile (ctx , jars , buildijar ):
64- res_cmd = ""
65- for f in ctx .files .resources :
66- c_dir , res_path = _adjust_resources_path (f .path )
67- change_dir = "-C " + c_dir if c_dir else ""
68- res_cmd = "\n {jar} uf {out} " + change_dir + " " + res_path
68+ res_cmd = _add_resources_cmd (ctx )
6969 ijar_cmd = ""
7070 if buildijar :
7171 ijar_cmd = "\n {ijar} {out} {ijar_out}" .format (
You can’t perform that action at this time.
0 commit comments