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:compiler_plugin.bzl", "kt_compiler_plugin") 16load(":assert_propagation_test.bzl", "assert_propagation_test") 17 18licenses(["notice"]) 19 20assert_propagation_test( 21 name = "f", 22 expected_plugin_ids = ["1"], 23 deps = [":e"], 24) 25 26assert_propagation_test( 27 name = "e", 28 expected_plugin_ids = [], 29 exports = [":a"], 30) 31 32assert_propagation_test( 33 name = "d", 34 expected_plugin_ids = [ 35 "1", 36 "2", 37 ], 38 deps = [ 39 ":a", 40 ":b", 41 ], 42) 43 44assert_propagation_test( 45 name = "c", 46 expected_plugin_ids = ["2"], 47 deps = [":b"], 48) 49 50assert_propagation_test( 51 name = "b", 52 expected_plugin_ids = ["1"], 53 exported_plugins = [":2"], 54 deps = [":a"], 55) 56 57assert_propagation_test( 58 name = "a", 59 expected_plugin_ids = [], 60 exported_plugins = [":1"], 61) 62 63kt_compiler_plugin( 64 name = "1", 65 jar = "//tests/analysis/compiler_plugin:empty_jar", 66 plugin_id = "1", 67) 68 69kt_compiler_plugin( 70 name = "2", 71 jar = "//tests/analysis/compiler_plugin:empty_jar", 72 plugin_id = "2", 73) 74 75kt_compiler_plugin( 76 name = "3", 77 jar = "//tests/analysis/compiler_plugin:empty_jar", 78 plugin_id = "3", 79) 80