| // 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. |
| |
| 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", |
| ], |
| } |
| |
| filegroup { |
| name: "framework-statsd-sources", |
| srcs: [ |
| "java/**/*.java", |
| ":framework-statsd-aidl-sources", |
| ":statslog-statsd-java-gen", |
| ], |
| } |
| |
| java_defaults { |
| name: "framework-statsd-defaults", |
| |
| // TODO(b/146757305): Use "module_current" once it's ready. |
| sdk_version: "core_current", |
| |
| libs: [ |
| "framework-annotations-lib", |
| |
| // TODO(b/146757305): should be unnecessary once |
| // sdk_version="module_lib_current" or "module_current" |
| "android_module_lib_stubs_current", |
| ], |
| } |
| |
| java_library { |
| name: "framework-statsd", |
| defaults: [ |
| "framework-statsd-defaults", |
| ], |
| installable: true, |
| |
| srcs: [ |
| ":framework-statsd-sources", |
| ], |
| |
| aidl: { |
| // TODO(b/146757305): should be unnecessary once |
| // sdk_version="module_lib_current" or "module_current" |
| include_dirs: [ |
| // To refer: |
| // android.app.PendintIntent |
| "frameworks/base/core/java", |
| ], |
| }, |
| |
| permitted_packages: [ |
| "android.app", |
| "android.os", |
| "android.util", |
| ], |
| |
| 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-statsd-defaults", |
| ], |
| srcs: [ ":framework-statsd-stubs-srcs-publicapi" ], |
| } |
| |
| java_library { |
| name: "framework-statsd-stubs-systemapi", |
| defaults: [ |
| "framework-statsd-defaults", |
| ], |
| srcs: [ ":framework-statsd-stubs-srcs-systemapi" ], |
| } |
| |
| java_library { |
| name: "framework-statsd-stubs-module_libs_api", |
| defaults: [ |
| "framework-statsd-defaults", |
| ], |
| srcs: [ ":framework-statsd-stubs-srcs-module_libs_api" ], |
| } |