1# Copyright 2022 Google LLC. 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 15load("//kotlin:rules.bzl", "kt_jvm_library") 16load("//tests/analysis:for_test.bzl", "rules_for_test") 17load("//tests/analysis:jvm_library_test.bzl", "jvm_library_test") 18load("//tests/analysis:util.bzl", "ONLY_FOR_ANALYSIS_TEST_TAGS") 19 20package( 21 default_testonly = True, 22 default_visibility = ["//tests/analysis/jvm_library/friends:__subpackages__"], 23) 24 25licenses(["notice"]) 26 27jvm_library_test( 28 name = "no_kt_exported_friend_cross_package_test", 29 expected_friend_jar_names = [ 30 "libkt_exports_friend-compile.jar", 31 # Absent # "libfriend-compile.jar" 32 ], 33 target_under_test = rules_for_test.kt_jvm_library( 34 name = "no_kt_exported_friend_cross_package", 35 srcs = ["Input.kt"], 36 deps = [":kt_exports_friend"], 37 ), 38) 39 40jvm_library_test( 41 name = "no_direct_friend_cross_package_test", 42 expected_friend_jar_names = [], 43 target_under_test = rules_for_test.kt_jvm_library( 44 name = "no_direct_friend_cross_package", 45 srcs = ["Input.kt"], 46 deps = ["//tests/analysis/jvm_library/friends:friend"], 47 ), 48) 49 50kt_jvm_library( 51 name = "kt_exports_friend", 52 srcs = ["Input.kt"], 53 tags = ONLY_FOR_ANALYSIS_TEST_TAGS, 54 exports = ["//tests/analysis/jvm_library/friends:friend"], 55) 56 57kt_jvm_library( 58 name = "subfriend", 59 srcs = ["Input.kt"], 60 tags = ONLY_FOR_ANALYSIS_TEST_TAGS, 61) 62