• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2022 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
19// To generate HealthFitnessStatsLog for logging.
20// DO NOT CHANGE
21genrule {
22    name: "statslog-healthfitness-java-gen",
23    tools: ["stats-log-api-gen"],
24    cmd: "$(location stats-log-api-gen) --java $(out) --module healthfitness" +
25        " --javaPackage android.health" +
26        " --javaClass HealthFitnessStatsLog --minApiLevel 34" +
27        " --nonStatic",
28    out: ["android/health/HealthFitnessStatsLog.java"],
29}
30
31// To disable NewApi checks on the generated HealthFitnessStatsLog.
32// DO NOT CHANGE
33java_library {
34    name: "healthfitness-statsd",
35    sdk_version: "module_current",
36    min_sdk_version: "34",
37    srcs: [
38        ":statslog-healthfitness-java-gen",
39    ],
40    libs: [
41        // needed for restricted atoms
42        "androidx.annotation_annotation",
43        // To add StatsLog as a dependency of the generated file.
44        "framework-statsd.stubs.module_lib",
45    ],
46    apex_available: [
47        "com.android.healthfitness",
48    ],
49}
50
51filegroup {
52    name: "framework-healthfitness-sources",
53    srcs: [
54        "java/**/*.aidl",
55        "java/**/*.java",
56    ],
57    path: "java",
58    visibility: [
59        "//frameworks/base/api",
60        "//packages/modules/HealthFitness:__subpackages__",
61    ],
62}
63
64java_sdk_library {
65    name: "framework-healthfitness",
66    permitted_packages: [
67        "android.health",
68        "com.android.healthfitness.flags",
69    ],
70    srcs: [":framework-healthfitness-sources"],
71    defaults: ["framework-module-defaults"],
72    sdk_version: "module_current",
73    min_sdk_version: "34",
74    apex_available: ["com.android.healthfitness"],
75    impl_library_visibility: [
76        "//packages/modules/HealthFitness:__subpackages__",
77        "//vendor:__subpackages__",
78    ],
79    static_libs: [
80        "healthfitness-statsd",
81        "healthfitness-aconfig-flags-lib",
82        "healthfitness-aconfig-flags-helper",
83    ],
84    aconfig_declarations: [
85        "healthconnect-aconfig-flags",
86    ],
87    errorprone: {
88        extra_check_modules: [
89            "//external/nullaway:nullaway_plugin",
90        ],
91        javacflags: [
92            "-XepExcludedPaths:.*/out/soong/.*",
93            "-Xep:NullAway:ERROR",
94            "-XepOpt:NullAway:AnnotatedPackages=android.health.connect",
95        ],
96    },
97    lint: {
98        baseline_filename: "lint-baseline.xml",
99    },
100}
101