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