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 out: ["android/health/HealthFitnessStatsLog.java"], 28} 29 30// To disable NewApi checks on the generated HealthFitnessStatsLog. 31// DO NOT CHANGE 32java_library { 33 name: "healthfitness-statsd", 34 sdk_version: "module_current", 35 min_sdk_version: "34", 36 srcs: [ 37 ":statslog-healthfitness-java-gen", 38 ], 39 libs: [ 40 // needed for restricted atoms 41 "androidx.annotation_annotation", 42 // To add StatsLog as a dependency of the generated file. 43 "framework-statsd.stubs.module_lib", 44 ], 45 apex_available: [ 46 "com.android.healthfitness", 47 ], 48} 49 50filegroup { 51 name: "framework-healthfitness-sources", 52 srcs: [ 53 "java/**/*.aidl", 54 "java/**/*.java" 55 ], 56 path: "java", 57 visibility: [ 58 "//frameworks/base", 59 "//packages/modules/HealthFitness:__subpackages__", 60 ], 61} 62 63java_sdk_library { 64 name: "framework-healthfitness", 65 permitted_packages: [ 66 "android.health", 67 "com.android.healthfitness.flags", 68 ], 69 srcs: [":framework-healthfitness-sources"], 70 defaults: ["framework-module-defaults"], 71 sdk_version: "module_current", 72 min_sdk_version: "34", 73 apex_available: ["com.android.healthfitness"], 74 impl_library_visibility: [ 75 "//packages/modules/HealthFitness:__subpackages__" 76 ], 77 static_libs: [ 78 "healthfitness-statsd", 79 "healthfitness-aconfig-flags-lib", 80 ], 81 aconfig_declarations: [ 82 "healthconnect-aconfig-flags", 83 ], 84 errorprone: { 85 extra_check_modules: [ 86 "//external/nullaway:nullaway_plugin" 87 ], 88 javacflags: [ 89 "-XepExcludedPaths:.*/out/soong/.*", 90 "-Xep:NullAway:ERROR", 91 "-XepOpt:NullAway:AnnotatedPackages=android.health.connect", 92 ], 93 }, 94} 95