Skip to content

Commit 341f15e

Browse files
ted-xiecopybara-github
authored andcommitted
Compatibility shim for java_common.add_constraints()
PiperOrigin-RevId: 868283442 Change-Id: I52778269821d2d640ba8613bc995e0e3ac28a9bf
1 parent b8ab40f commit 341f15e

4 files changed

Lines changed: 29 additions & 0 deletions

File tree

rules/BUILD

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ bzl_library(
4949
],
5050
visibility = ["//:__subpackages__"],
5151
deps = [
52+
":add_constraints_bzl",
5253
":visibility_bzl",
5354
"//providers:providers_bzl",
5455
"//rules/acls:bzl",
@@ -60,6 +61,15 @@ bzl_library(
6061
],
6162
)
6263

64+
bzl_library(
65+
name = "add_constraints_bzl",
66+
srcs = ["add_constraints.bzl"],
67+
visibility = ["//:__subpackages__"],
68+
deps = [
69+
":visibility_bzl",
70+
],
71+
)
72+
6373
bzl_library(
6474
name = "android_split_transition_bzl",
6575
srcs = [

rules/add_constraints.bzl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright 2026 The Bazel Authors. All rights reserved.
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+
"""OSS compatibility shim for a Google-internal feature."""
15+
16+
def add_constraints(java_info, **_unused_kwargs):
17+
return java_info

rules/android_binary/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ bzl_library(
1414
srcs = glob(["*.bzl"]),
1515
visibility = ["//:__subpackages__"],
1616
deps = [
17+
"//rules:add_constraints_bzl",
1718
"//rules:android_platforms_transition_bzl",
1819
"//rules:android_split_transition_bzl",
1920
"//rules:common_bzl",

rules/android_local_test/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ bzl_library(
2121
name = "bzl",
2222
srcs = glob(["*.bzl"]),
2323
deps = [
24+
"//rules:add_constraints_bzl",
2425
"//rules:common_bzl",
2526
"//rules:min_sdk_version_bzl",
2627
"//rules:visibility_bzl",

0 commit comments

Comments
 (0)