| // 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_visibility: [ ":__pkg__" ] |
| } |
| |
| genrule { |
| name: "statslog-statsd-java-gen", |
| tools: ["stats-log-api-gen"], |
| cmd: "$(location stats-log-api-gen) --java $(out) --module statsd" + |
| " --javaPackage com.android.internal.util --javaClass StatsdStatsLog", |
| out: ["com/android/internal/util/StatsdStatsLog.java"], |
| } |
| |
| java_library_static { |
| name: "statslog-statsd", |
| srcs: [ |
| ":statslog-statsd-java-gen", |
| ], |
| visibility: [ |
| "//cts/hostsidetests/statsd/apps:__subpackages__", |
| ] |
| } |
| |
| filegroup { |
| name: "framework-statsd-sources", |
| srcs: [ |
| "java/**/*.java", |
| ":framework-statsd-aidl-sources", |
| ":statslog-statsd-java-gen", |
| ], |
| visibility: [ |
| "//frameworks/base", // For the "global" stubs. |
| "//frameworks/base/apex/statsd:__subpackages__", |
| ], |
| } |
| java_library { |
| name: "framework-statsd", |
| installable: true, |
| sdk_version: "module_current", |
| libs: [ "framework-annotations-lib" ], |
| |
| srcs: [ |
| ":framework-statsd-sources", |
| ], |
| |
| permitted_packages: [ |
| "android.app", |
| "android.os", |
| "android.util", |
| ], |
| |
| plugins: ["java_api_finder"], |
| |
| hostdex: true, // for hiddenapi check |
| visibility: [ |
| "//frameworks/base/apex/statsd:__subpackages__", |
| ], |
| apex_available: [ |
| "com.android.os.statsd", |
| "test_com.android.os.statsd", |
| ], |
| } |
| |
| stubs_defaults { |
| name: "framework-statsd-stubs-srcs-defaults", |
| srcs: [ |
| ":framework-statsd-sources", |
| ], |
| |
| libs: [ |
| "framework-annotations-lib", |
| ], |
| sdk_version: "system_current", |
| } |
| |
| droidstubs { |
| name: "framework-statsd-stubs-srcs-publicapi", |
| defaults: [ |
| "framework-module-stubs-defaults-systemapi", |
| "framework-statsd-stubs-srcs-defaults", |
| ], |
| } |
| |
| droidstubs { |
| name: "framework-statsd-stubs-srcs-systemapi", |
| defaults: [ |
| "framework-module-stubs-defaults-systemapi", |
| "framework-statsd-stubs-srcs-defaults", |
| ], |
| |
| } |
| |
| droidstubs { |
| name: "framework-statsd-api-module_libs_api", |
| defaults: [ |
| "framework-module-api-defaults-module_libs_api", |
| "framework-statsd-stubs-srcs-defaults", |
| ], |
| } |
| |
| droidstubs { |
| name: "framework-statsd-stubs-srcs-module_libs_api", |
| defaults: [ |
| "framework-module-stubs-defaults-module_libs_api", |
| "framework-statsd-stubs-srcs-defaults", |
| ], |
| } |
| |
| java_library { |
| name: "framework-statsd-stubs-publicapi", |
| defaults: ["framework-module-stubs-lib-defaults-publicapi"], |
| srcs: [ ":framework-statsd-stubs-srcs-publicapi" ], |
| visibility: [ |
| "//frameworks/base", // Framework |
| "//frameworks/base/apex/statsd", // statsd apex |
| ], |
| } |
| |
| java_library { |
| name: "framework-statsd-stubs-systemapi", |
| defaults: ["framework-module-stubs-lib-defaults-systemapi"], |
| srcs: [ ":framework-statsd-stubs-srcs-systemapi" ], |
| visibility: [ |
| "//frameworks/base", // Framework |
| "//frameworks/base/apex/statsd", // statsd apex |
| ], |
| } |
| |
| java_library { |
| name: "framework-statsd-stubs-module_libs_api", |
| defaults: ["framework-module-stubs-lib-defaults-module_libs_api"], |
| srcs: [ ":framework-statsd-stubs-srcs-module_libs_api" ], |
| visibility: [ |
| "//frameworks/base", // Framework |
| "//frameworks/base/apex/statsd", // statsd apex |
| "//frameworks/opt/net/wifi/service" // wifi service |
| ], |
| } |
| |
| android_test { |
| name: "FrameworkStatsdTest", |
| platform_apis: true, |
| srcs: [ |
| // TODO(b/147705194): Use framework-statsd as a lib dependency instead. |
| ":framework-statsd-sources", |
| "test/**/*.java", |
| ], |
| manifest: "test/AndroidManifest.xml", |
| static_libs: [ |
| "androidx.test.rules", |
| "truth-prebuilt", |
| ], |
| libs: [ |
| "android.test.runner.stubs", |
| "android.test.base.stubs", |
| ], |
| test_suites: [ |
| "device-tests", |
| ], |
| } |
| |