@@ -90,6 +90,9 @@ def _java_toolchain_impl(ctx):
90
90
else :
91
91
header_compiler_direct_data = []
92
92
header_compiler_direct_jvm_opts = []
93
+ if ctx .attr .oneversion_allowlist and ctx .attr .oneversion_whitelist :
94
+ fail ("oneversion_allowlist and oneversion_whitelist are mutually exclusive" )
95
+ oneversion_allowlist = ctx .file .oneversion_allowlist if ctx .file .oneversion_allowlist else ctx .file .oneversion_whitelist
93
96
java_toolchain_info = _new_javatoolchaininfo (
94
97
bootclasspath = bootclasspath_info .bootclasspath ,
95
98
ijar = ctx .attr .ijar .files_to_run if ctx .attr .ijar else None ,
@@ -128,7 +131,7 @@ def _java_toolchain_impl(ctx):
128
131
_jspecify_info = _get_jspecify_info (ctx ),
129
132
_local_java_optimization_config = ctx .files ._local_java_optimization_configuration ,
130
133
_one_version_tool = ctx .attr .oneversion .files_to_run if ctx .attr .oneversion else None ,
131
- _one_version_allowlist = ctx . file . oneversion_whitelist ,
134
+ _one_version_allowlist = oneversion_allowlist ,
132
135
_one_version_allowlist_for_tests = ctx .file .oneversion_allowlist_for_tests ,
133
136
_package_configuration = [dep [JavaPackageConfigurationInfo ] for dep in ctx .attr .package_configuration ],
134
137
_reduced_classpath_incompatible_processors = depset (ctx .attr .reduced_classpath_incompatible_processors , order = "preorder" ),
@@ -501,6 +504,10 @@ Label of the one-version enforcement binary.
501
504
""" ,
502
505
),
503
506
"oneversion_whitelist" : attr .label (
507
+ allow_single_file = True ,
508
+ doc = """Deprecated: use oneversion_allowlist instead""" ,
509
+ ),
510
+ "oneversion_allowlist" : attr .label (
504
511
allow_single_file = True ,
505
512
doc = """
506
513
Label of the one-version allowlist.
0 commit comments