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/jvm/testing:for_analysis.bzl", ktfa = "kt_for_analysis") 16load("//kotlin/jvm/testing:jvm_library_analysis_test.bzl", "kt_jvm_library_analysis_test") 17 18package( 19 default_applicable_licenses = ["//:license"], 20 default_testonly = True, 21) 22 23licenses(["notice"]) 24 25kt_jvm_library_analysis_test( 26 name = "has_exports_test", 27 expected_compile_jar_names = [ 28 # go/keep-sorted start 29 "libexports_transitive-compile.jar", 30 "libhas_exports-compile.jar", 31 "libjava_library-hjar.jar", 32 "libkt_jvm_library-compile.jar", 33 "libtransitive-compile.jar", 34 # go/keep-sorted end 35 ], 36 target_under_test = ktfa.kt_jvm_library( 37 name = "has_exports", 38 srcs = ["Input.kt"], 39 exports = [ 40 ":exports_transitive", 41 ":java_library", 42 ":kt_jvm_library", 43 ], 44 ), 45) 46 47ktfa.kt_jvm_library( 48 name = "exports_transitive", 49 srcs = ["Input.kt"], 50 exports = [ 51 ktfa.kt_jvm_library( 52 name = "transitive", 53 srcs = ["Input.kt"], 54 ), 55 ], 56) 57 58ktfa.kt_jvm_library( 59 name = "kt_jvm_library", 60 srcs = ["Input.kt"], 61) 62 63ktfa.java_library( 64 name = "java_library", 65 srcs = ["Input.java"], # need file here so we get a Jar 66) 67