| // Copyright (C) 2019 The Android Open Source Project |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| |
| package { |
| default_team: "trendy_team_updatable_sdk_apis", |
| default_applicable_licenses: ["Android-Apache-2.0"], |
| } |
| |
| cc_defaults { |
| name: "derive_sdk-defaults", |
| min_sdk_version: "30", |
| shared_libs: ["liblog"], |
| // static c++/libbase for smaller size |
| stl: "c++_static", |
| static_libs: [ |
| "libbase", |
| "libmodules-utils-build", |
| "libprotobuf-cpp-lite", |
| "libsdk_proto", |
| ], |
| } |
| |
| cc_library { |
| name: "libderive_sdk", |
| srcs: ["derive_sdk.cpp"], |
| defaults: ["derive_sdk-defaults"], |
| apex_available: ["com.android.sdkext"], |
| } |
| |
| cc_defaults { |
| name: "derive_sdk_binary-defaults", |
| defaults: ["derive_sdk-defaults"], |
| srcs: ["main.cpp"], |
| static_libs: ["libderive_sdk"], |
| } |
| |
| cc_library { |
| name: "libderive_sdk_jni", |
| srcs: ["derive_sdk_jni.cpp"], |
| header_libs: ["libnativehelper_header_only"], |
| shared_libs: [ |
| "liblog", |
| "libderive_sdk", |
| ], |
| static_libs: ["libbase"], |
| min_sdk_version: "30", |
| stl: "c++_static", |
| } |
| |
| cc_binary { |
| name: "derive_sdk", |
| defaults: ["derive_sdk_binary-defaults"], |
| apex_available: ["com.android.sdkext"], |
| } |
| |
| // Work around testing using a 64-bit test suite on 32-bit test device by |
| // using a prefer32 version of derive_sdk in testing. |
| cc_binary { |
| name: "derive_sdk_prefer32", |
| defaults: ["derive_sdk_binary-defaults"], |
| compile_multilib: "prefer32", |
| stem: "derive_sdk", |
| apex_available: ["test_com.android.sdkext"], |
| installable: false, |
| } |
| |
| cc_test { |
| name: "derive_sdk_test", |
| defaults: ["derive_sdk-defaults"], |
| srcs: ["derive_sdk_test.cpp"], |
| require_root: true, |
| static_libs: ["libderive_sdk"], |
| test_suites: ["general-tests"], |
| test_mainline_modules: ["com.google.android.sdkext.apex"], |
| } |
| |
| prebuilt_etc { |
| name: "derive_sdk.rc", |
| src: "derive_sdk.rc", |
| installable: false, |
| } |