File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 33load ("//java/common:java_common.bzl" , "java_common" )
44load ("//java/common:java_info.bzl" , "JavaInfo" )
55
6- def _java_single_jar ( ctx ):
6+ def _single_jar_inputs ( deps , deploy_env ):
77 transitive_inputs = []
8- for dep in ctx . attr . deps :
8+ for dep in deps :
99 if JavaInfo in dep :
1010 info = dep [JavaInfo ]
1111 transitive_inputs .append (info .transitive_runtime_jars )
@@ -25,11 +25,15 @@ def _java_single_jar(ctx):
2525 if hasattr (java_common , "JavaRuntimeClasspathInfo" ):
2626 deploy_env_jars = depset (transitive = [
2727 dep [java_common .JavaRuntimeClasspathInfo ].runtime_classpath
28- for dep in ctx . attr . deploy_env
28+ for dep in deploy_env
2929 ])
3030 excluded_jars = {jar : None for jar in deploy_env_jars .to_list ()}
3131 if excluded_jars :
3232 inputs = depset ([jar for jar in inputs .to_list () if jar not in excluded_jars ])
33+ return inputs
34+
35+ def _java_single_jar (ctx ):
36+ inputs = _single_jar_inputs (ctx .attr .deps , ctx .attr .deploy_env )
3337
3438 args = ctx .actions .args ()
3539 args .add_all ("--sources" , inputs )
You can’t perform that action at this time.
0 commit comments