1// Copyright (C) 2020 The Android Open Source Project 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 15package { 16 // See: http://go/android-license-faq 17 // A large-scale-change added 'default_applicable_licenses' to import 18 // all of the 'license_kinds' from "tools_treble_license" 19 // to get the below license kinds: 20 // SPDX-license-identifier-Apache-2.0 21 default_applicable_licenses: ["tools_treble_license"], 22} 23 24python_defaults { 25 name: "treble_split_default", 26 pkg_path: "treble/split", 27 version: { 28 py2: { 29 enabled: false, 30 }, 31 py3: { 32 enabled: true, 33 }, 34 }, 35 libs: [ 36 "py-setuptools", 37 ], 38} 39 40python_binary_host { 41 name: "treble_manifest_split", 42 main: "manifest_split.py", 43 defaults: ["treble_split_default"], 44 srcs: [ 45 "manifest_split.py", 46 ], 47 data: [ 48 "default_config.xml", 49 ], 50 version: { 51 py3: { 52 embedded_launcher: true, 53 }, 54 }, 55} 56 57python_library_host { 58 name: "treble_xml_diff", 59 defaults: ["treble_split_default"], 60 srcs: [ 61 "xml_diff.py", 62 ], 63} 64 65python_binary_host { 66 name: "treble_manifest_diff", 67 main: "manifest_diff.py", 68 defaults: ["treble_split_default"], 69 srcs: [ 70 "manifest_diff.py", 71 ], 72 libs: [ 73 "treble_xml_diff", 74 ], 75} 76 77python_test_host { 78 name: "treble_manifest_split_test", 79 main: "test.py", 80 defaults: ["treble_split_default"], 81 srcs: [ 82 "manifest_diff.py", 83 "manifest_diff_test.py", 84 "manifest_split.py", 85 "manifest_split_test.py", 86 "test.py", 87 "xml_diff.py", 88 "xml_diff_test.py", 89 ], 90 libs: [ 91 "py-mock", 92 ], 93 test_config: "test.xml", 94 test_suites: ["general-tests"], 95} 96