1/* 2 * Copyright (C) 2020 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package { 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21python_defaults { 22 name: "hiddenapi_defaults", 23 version: { 24 py3: { 25 embedded_launcher: true, 26 }, 27 }, 28} 29 30python_binary_host { 31 name: "analyze_bcpf", 32 main: "analyze_bcpf.py", 33 defaults: ["hiddenapi_defaults"], 34 srcs: ["analyze_bcpf.py"], 35 // Make sure that the bpmodify tool is built. 36 data: [":bpmodify"], 37 libs: [ 38 "signature_trie", 39 ], 40} 41 42python_test_host { 43 name: "analyze_bcpf_test", 44 main: "analyze_bcpf_test.py", 45 defaults: ["hiddenapi_defaults"], 46 srcs: [ 47 "analyze_bcpf.py", 48 "analyze_bcpf_test.py", 49 ], 50 // Make sure that the bpmodify tool is built. 51 data: [":bpmodify"], 52 libs: [ 53 "signature_trie", 54 ], 55 test_options: { 56 unit_test: true, 57 }, 58} 59 60python_binary_host { 61 name: "merge_csv", 62 main: "merge_csv.py", 63 defaults: ["hiddenapi_defaults"], 64 srcs: ["merge_csv.py"], 65} 66 67python_binary_host { 68 name: "generate_hiddenapi_lists", 69 main: "generate_hiddenapi_lists.py", 70 defaults: ["hiddenapi_defaults"], 71 srcs: ["generate_hiddenapi_lists.py"], 72} 73 74python_test_host { 75 name: "generate_hiddenapi_lists_test", 76 main: "generate_hiddenapi_lists_test.py", 77 defaults: ["hiddenapi_defaults"], 78 srcs: [ 79 "generate_hiddenapi_lists.py", 80 "generate_hiddenapi_lists_test.py", 81 ], 82 test_options: { 83 unit_test: true, 84 }, 85} 86 87python_library_host { 88 name: "signature_trie", 89 srcs: ["signature_trie.py"], 90} 91 92python_test_host { 93 name: "signature_trie_test", 94 main: "signature_trie_test.py", 95 defaults: ["hiddenapi_defaults"], 96 srcs: ["signature_trie_test.py"], 97 libs: ["signature_trie"], 98 test_options: { 99 unit_test: true, 100 }, 101} 102 103python_binary_host { 104 name: "verify_overlaps", 105 main: "verify_overlaps.py", 106 defaults: ["hiddenapi_defaults"], 107 srcs: ["verify_overlaps.py"], 108 libs: [ 109 "signature_trie", 110 ], 111} 112 113python_test_host { 114 name: "verify_overlaps_test", 115 main: "verify_overlaps_test.py", 116 defaults: ["hiddenapi_defaults"], 117 srcs: [ 118 "verify_overlaps.py", 119 "verify_overlaps_test.py", 120 ], 121 libs: [ 122 "signature_trie", 123 ], 124 test_options: { 125 unit_test: true, 126 }, 127} 128 129python_binary_host { 130 name: "signature_patterns", 131 main: "signature_patterns.py", 132 defaults: ["hiddenapi_defaults"], 133 srcs: ["signature_patterns.py"], 134} 135 136python_test_host { 137 name: "signature_patterns_test", 138 main: "signature_patterns_test.py", 139 defaults: ["hiddenapi_defaults"], 140 srcs: [ 141 "signature_patterns.py", 142 "signature_patterns_test.py", 143 ], 144 test_options: { 145 unit_test: true, 146 }, 147} 148