@@ -14,14 +14,25 @@ def _setup(env, target):
1414 compile_jar = _file (env .ctx .attr .associate_abi_jar ),
1515 output_jar = _file (env .ctx .attr .associate_jar ),
1616 )
17+ associate_deps_java_info2 = JavaInfo (
18+ compile_jar = _file (env .ctx .attr .associate_abi_jar2 ),
19+ output_jar = _file (env .ctx .attr .associate_jar2 ),
20+ )
1721
22+ # More than 1 associate should be allowed if they resolve to the same module
1823 associate_deps = [
1924 {
2025 JavaInfo : associate_deps_java_info ,
2126 _KtJvmInfo : _KtJvmInfo (
2227 module_name = "associate_name" ,
2328 ),
2429 },
30+ {
31+ JavaInfo : associate_deps_java_info2 ,
32+ _KtJvmInfo : _KtJvmInfo (
33+ module_name = "associate_name" ,
34+ ),
35+ },
2536 ]
2637
2738 direct_deps = [
@@ -84,7 +95,9 @@ def _strict_abi_test_impl(env, target):
8495
8596 # but FULL FAT associate jars and not the ABI associate jar
8697 classpath .contains (_file (env .ctx .attr .associate_jar ).short_path )
98+ classpath .contains (_file (env .ctx .attr .associate_jar2 ).short_path )
8799 classpath .not_contains (_file (env .ctx .attr .associate_abi_jar ).short_path )
100+ classpath .not_contains (_file (env .ctx .attr .associate_abi_jar2 ).short_path )
88101
89102def _fat_abi_test_impl (env , target ):
90103 arrangment = _setup (env , target )
@@ -116,7 +129,9 @@ def _fat_abi_test_impl(env, target):
116129
117130 # but ABI associate jars and not the FULL FAT associate jar
118131 classpath .contains (_file (env .ctx .attr .associate_abi_jar ).short_path )
132+ classpath .contains (_file (env .ctx .attr .associate_abi_jar2 ).short_path )
119133 classpath .not_contains (_file (env .ctx .attr .associate_jar ).short_path )
134+ classpath .not_contains (_file (env .ctx .attr .associate_jar2 ).short_path )
120135
121136def _transitive_from_exports_test_impl (env , target ):
122137 arrangment_dict = _structs .to_dict (_setup (env , target ))
@@ -240,14 +255,18 @@ def _abi_test(name, impl):
240255 target = name + "_subject" ,
241256 attr_values = {
242257 "associate_abi_jar" : util .empty_file (name + "associate_abi.jar" ),
258+ "associate_abi_jar2" : util .empty_file (name + "associate_abi2.jar" ),
243259 "associate_jar" : util .empty_file (name + "associate.jar" ),
260+ "associate_jar2" : util .empty_file (name + "associate2.jar" ),
244261 "direct_dep_abi_jar" : util .empty_file (name + "direct_dep_abi.jar" ),
245262 "direct_dep_jar" : util .empty_file (name + "direct_dep.jar" ),
246263 "jvm_jar" : util .empty_file (name + "jvm.jar" ),
247264 },
248265 attrs = {
249266 "associate_abi_jar" : attr .label (allow_files = True ),
267+ "associate_abi_jar2" : attr .label (allow_files = True ),
250268 "associate_jar" : attr .label (allow_files = True ),
269+ "associate_jar2" : attr .label (allow_files = True ),
251270 "direct_dep_abi_jar" : attr .label (allow_files = True ),
252271 "direct_dep_jar" : attr .label (allow_files = True ),
253272 "jvm_jar" : attr .label (allow_files = True ),
0 commit comments