1# Copyright 2021 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 15""" 16Common code for reuse across java_* rules 17""" 18 19load("//java/common:java_semantics.bzl", "semantics") 20load("//java/private:java_common.bzl", "java_common") 21load("//java/private:java_info.bzl", "JavaPluginInfo") 22load(":rule_util.bzl", "merge_attrs") 23 24# copybara: default multiline visibility 25 26BASIC_JAVA_LIBRARY_IMPLICIT_ATTRS = merge_attrs( 27 { 28 "_java_plugins": attr.label( 29 default = semantics.JAVA_PLUGINS_FLAG_ALIAS_LABEL, 30 providers = [JavaPluginInfo], 31 ), 32 # TODO(b/245144242): Used by IDE integration, remove when toolchains are used 33 "_java_toolchain": attr.label( 34 default = semantics.JAVA_TOOLCHAIN_LABEL, 35 providers = [java_common.JavaToolchainInfo], 36 ), 37 "_use_auto_exec_groups": attr.bool(default = True), 38 }, 39) 40