Yun Peng | 3029a7d | 2023-06-07 07:40:12 -0700 | [diff] [blame] | 1 | # Copyright 2023 The Bazel Authors. All rights reserved. |
Ivo List | f259b8a | 2020-09-16 04:54:13 -0700 | [diff] [blame] | 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
Yun Peng | 3029a7d | 2023-06-07 07:40:12 -0700 | [diff] [blame] | 15 | """Redirect symbols from rules_java to keep backward-compatibility.""" |
Ivo List | f259b8a | 2020-09-16 04:54:13 -0700 | [diff] [blame] | 16 | |
Yun Peng | 3029a7d | 2023-06-07 07:40:12 -0700 | [diff] [blame] | 17 | load("@rules_java//toolchains:local_java_repository.bzl", _local_java_repository = "local_java_repository", _local_java_runtime = "local_java_runtime") |
Ivo List | ba8d404 | 2020-12-17 07:23:30 -0800 | [diff] [blame] | 18 | |
Yun Peng | 3029a7d | 2023-06-07 07:40:12 -0700 | [diff] [blame] | 19 | def local_java_repository(name, **kwargs): |
| 20 | _local_java_repository(name, **kwargs) |
Ivo List | ba8d404 | 2020-12-17 07:23:30 -0800 | [diff] [blame] | 21 | native.register_toolchains("@" + name + "//:runtime_toolchain_definition") |
Fabian Meumertzheim | f79ca02 | 2023-10-19 10:11:18 -0700 | [diff] [blame] | 22 | native.register_toolchains("@" + name + "//:bootstrap_runtime_toolchain_definition") |
Yun Peng | 3029a7d | 2023-06-07 07:40:12 -0700 | [diff] [blame] | 23 | |
| 24 | local_java_runtime = _local_java_runtime |