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 3
3
load ("//java/common:java_common.bzl" , "java_common" )
4
4
load ("//java/common:java_info.bzl" , "JavaInfo" )
5
5
6
- def _java_single_jar ( ctx ):
6
+ def _single_jar_inputs ( deps , deploy_env ):
7
7
transitive_inputs = []
8
- for dep in ctx . attr . deps :
8
+ for dep in deps :
9
9
if JavaInfo in dep :
10
10
info = dep [JavaInfo ]
11
11
transitive_inputs .append (info .transitive_runtime_jars )
@@ -25,11 +25,15 @@ def _java_single_jar(ctx):
25
25
if hasattr (java_common , "JavaRuntimeClasspathInfo" ):
26
26
deploy_env_jars = depset (transitive = [
27
27
dep [java_common .JavaRuntimeClasspathInfo ].runtime_classpath
28
- for dep in ctx . attr . deploy_env
28
+ for dep in deploy_env
29
29
])
30
30
excluded_jars = {jar : None for jar in deploy_env_jars .to_list ()}
31
31
if excluded_jars :
32
32
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 )
33
37
34
38
args = ctx .actions .args ()
35
39
args .add_all ("--sources" , inputs )
You can’t perform that action at this time.
0 commit comments