1// Copyright (C) 2019 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_updatable_sdk_apis", 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20cc_defaults { 21 name: "derive_classpath-defaults", 22 min_sdk_version: "30", 23 shared_libs: ["liblog"], 24 // static c++/libbase for smaller size 25 stl: "c++_static", 26 static_libs: [ 27 "libbase", 28 "libclasspaths_proto", 29 "libmodules-utils-build", 30 "libprotobuf-cpp-lite", 31 ], 32} 33 34cc_library { 35 name: "libderive_classpath", 36 srcs: ["derive_classpath.cpp"], 37 defaults: ["derive_classpath-defaults"], 38 apex_available: ["com.android.sdkext"], 39} 40 41cc_defaults { 42 name: "derive_classpath_binary-defaults", 43 defaults: ["derive_classpath-defaults"], 44 srcs: ["main.cpp"], 45 static_libs: ["libderive_classpath"], 46} 47 48cc_binary { 49 name: "derive_classpath", 50 defaults: ["derive_classpath_binary-defaults"], 51 apex_available: ["com.android.sdkext"], 52} 53 54// Work around testing using a 64-bit test suite on 32-bit test device by 55// using a prefer32 version of derive_sdk in testing. 56cc_binary { 57 name: "derive_classpath_prefer32", 58 defaults: ["derive_classpath_binary-defaults"], 59 compile_multilib: "prefer32", 60 stem: "derive_classpath", 61 apex_available: ["test_com.android.sdkext"], 62 installable: false, 63} 64 65cc_test { 66 name: "derive_classpath_test", 67 defaults: ["derive_classpath-defaults"], 68 srcs: ["derive_classpath_test.cpp"], 69 require_root: true, 70 static_libs: ["libderive_classpath"], 71 test_suites: ["device-tests"], 72} 73 74prebuilt_etc { 75 name: "derive_classpath.rc", 76 src: "derive_classpath.rc", 77 installable: false, 78} 79