| // Copyright (C) 2025 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_applicable_licenses: ["Android-Apache-2.0"], |
| } |
| |
| aidl_interface { |
| name: "cts_sample_native_service_aidl_interface", |
| unstable: true, |
| visibility: [ |
| "//system/tools/aidl/build", |
| ], |
| backend: { |
| java: { |
| platform_apis: false, |
| }, |
| ndk: { |
| enabled: true, |
| }, |
| }, |
| srcs: [ |
| "lib/aidl/**/*.aidl", |
| ], |
| local_include_dir: "lib/aidl", |
| } |
| |
| cc_library_shared { |
| name: "libctssamplepreloadedlibrary", |
| srcs: [ |
| "lib/PreloadedLibrary.cpp", |
| ], |
| cflags: [ |
| "-Wall", |
| "-Werror", |
| "-Wextra", |
| "-Wno-missing-field-initializers", |
| "-Wno-unused-variable", |
| ], |
| sdk_version: "current", |
| stl: "c++_shared", |
| } |
| |
| cc_library_shared { |
| name: "libctssamplenativeservice", |
| srcs: [ |
| "lib/NativeService.cpp", |
| ], |
| cflags: [ |
| "-Wall", |
| "-Werror", |
| "-Wextra", |
| "-Wno-missing-field-initializers", |
| "-Wno-unused-variable", |
| ], |
| shared_libs: [ |
| "libandroid", |
| "libbinder_ndk", |
| "liblog", |
| "libctssamplepreloadedlibrary", |
| ], |
| header_libs: [ |
| "liblog_headers", |
| ], |
| static_libs: [ |
| "cts_sample_native_service_aidl_interface-ndk", |
| ], |
| sdk_version: "current", |
| stl: "c++_shared", |
| } |
| |
| android_test { |
| name: "CtsNativeServiceTest", |
| defaults: ["cts_defaults"], |
| team: "trendy_team_system_performance", |
| compile_multilib: "both", |
| dex_preopt: { |
| enabled: false, |
| }, |
| optimize: { |
| enabled: false, |
| }, |
| static_libs: [ |
| "am_flags_lib", |
| "android.os.flags-aconfig-java", |
| "compatibility-device-util-axt", |
| "cts_sample_native_service_aidl_interface-java", |
| ], |
| libs: [ |
| "android.test.runner.stubs.test", |
| "android.test.base.stubs.test", |
| "mockito", |
| ], |
| srcs: ["src/**/*.java"], |
| jni_libs: [ |
| "libctssamplenativeservice", |
| ], |
| sdk_version: "test_current", |
| test_suites: [ |
| "cts", |
| "general-tests", |
| ], |
| manifest: "AndroidManifest.xml", |
| test_config: "AndroidTest.xml", |
| use_embedded_native_libs: true, |
| } |