1// Copyright (C) 2022 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_applicable_licenses: ["Android-Apache-2.0"], 17} 18 19java_library { 20 name: "MediaPerformanceClassCommon", 21 srcs: [ 22 "src/**/*.java", 23 ], 24 libs: [ 25 "compatibility-device-util-axt", 26 "android.test.base", 27 "auto_value_annotations", 28 "guava", 29 "cts-verifier-framework", 30 ], 31 plugins: ["auto_value_plugin"], 32} 33 34android_test { 35 name: "MediaPerformanceClassCommonTests", 36 compile_multilib: "both", 37 static_libs: [ 38 "compatibility-device-util-axt", 39 "MediaPerformanceClassCommon", 40 "mediapc-auto-constants", 41 "mediapc-requirements", 42 ], 43 platform_apis: true, 44 srcs: ["tests/src/**/*.java"], 45 test_suites: [ 46 "general-tests", 47 ], 48 min_sdk_version: "30", 49} 50 51genrule { 52 name: "mediapc-auto-constants-gen", 53 srcs: ["src/android/mediapc/cts/common/AutoConstants.java.tmpl"], 54 tools: ["genreqsrc"], 55 tool_files: [":mpc_requirements_binarypb"], 56 cmd: "cat $(in) | $(location genreqsrc) -f $(location :mpc_requirements_binarypb) > $(out) ", 57 out: ["android/mediapc/cts/common/AutoConstants.java"], 58} 59 60java_library { 61 name: "mediapc-auto-constants", 62 srcs: [ 63 ":mediapc-auto-constants-gen", 64 ], 65} 66 67genrule { 68 name: "mediapc-requirements-gen", 69 srcs: ["src/android/mediapc/cts/common/Requirements.java.tmpl"], 70 tools: ["genreqsrc"], 71 tool_files: [":mpc_requirements_binarypb"], 72 cmd: "cat $(in) | $(location genreqsrc) -f $(location :mpc_requirements_binarypb) > $(out) ", 73 out: ["android/mediapc/cts/common/Requirements.java"], 74} 75 76java_library { 77 name: "mediapc-requirements", 78 srcs: [":mediapc-requirements-gen"], 79 libs: ["MediaPerformanceClassCommon"], 80} 81