1// Copyright (C) 2021 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 default_team: "trendy_team_framework_android_packages", 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20java_library_host { 21 name: "CtsPackageManagerParsingAnnotationProcessorApi", 22 srcs: ["api/src/**/*.kt"], 23 defaults: ["cts_defaults"], 24 libs: [ 25 "compatibility-host-util", 26 "cts-tradefed", 27 "tradefed", 28 ], 29 static_libs: [ 30 "cts-host-utils", 31 "jetbrains-annotations", 32 "junit", 33 ], 34} 35 36filegroup { 37 name: "CtsPackageManagerApkGeneratorSrc", 38 srcs: ["ApkGenerator.py"], 39} 40 41filegroup { 42 name: "CtsPackageManagerApkGeneratorJks", 43 srcs: ["ApkGenerator.jks"], 44} 45 46genrule_defaults { 47 name: "CtsPackageManagerParsingApkGenerator", 48 tool_files: [ 49 ":CtsPackageManagerApkGeneratorSrc", 50 ":CtsPackageManagerApkGeneratorJks", 51 ":framework-res", 52 ], 53 tools: [ 54 "aapt2", 55 "apksigner", 56 "soong_zip", 57 ], 58 cmd: "python3 $(location :CtsPackageManagerApkGeneratorSrc) \"$(location aapt2)\" " + 59 "\"$(location :framework-res)\" \"$(location apksigner)\" " + 60 "\"$(location :CtsPackageManagerApkGeneratorJks)\" " + 61 "\"$(genDir)\" $(in) && $(location soong_zip) -o $(out) -L 0 -C $(genDir)/out -D $(genDir)/out", 62} 63