1//
2// Copyright (C) 2023 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//      http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17package {
18    default_applicable_licenses: ["Android-Apache-2.0"],
19}
20
21aconfig_declarations {
22    name: "healthconnect-aconfig-flags",
23    package: "com.android.healthconnect.flags",
24    container: "com.android.healthconnect",
25    srcs: ["flags.aconfig"],
26}
27
28java_aconfig_library {
29    name: "healthconnect-aconfig-flags-lib",
30    aconfig_declarations: "healthconnect-aconfig-flags",
31    min_sdk_version: "34",
32    apex_available: [
33        "com.android.healthfitness",
34    ],
35    visibility: [
36        "//packages/modules/HealthFitness:__subpackages__",
37    ],
38}
39
40aconfig_declarations {
41    name: "healthfitness-aconfig-flags",
42    package: "com.android.healthfitness.flags",
43    container: "com.android.healthfitness",
44    exportable: true,
45    srcs: ["healthfitness-flags.aconfig"],
46}
47
48java_aconfig_library {
49    name: "healthfitness-exported-aconfig-flags-lib",
50    aconfig_declarations: "healthfitness-aconfig-flags",
51    min_sdk_version: "34",
52    defaults: ["framework-minus-apex-aconfig-java-defaults"],
53    mode: "exported",
54    visibility: [
55        // This has to be exported due to
56        // go/android-flags-howto-apis#test-infra-and-mainline-support, hence making this only
57        // visible to tests for now.
58        "//packages/modules/HealthFitness/tests:__subpackages__",
59    ],
60}
61
62// This is needed and only used for hostside tests
63// See:
64// - go/flag-value-annotations#usage
65// - http://shortn/_MWsbwMFJUo
66java_aconfig_library {
67    name: "healthfitness-exported-aconfig-flags-lib-host",
68    aconfig_declarations: "healthfitness-aconfig-flags",
69    min_sdk_version: "34",
70    defaults: ["framework-minus-apex-aconfig-java-defaults"],
71    mode: "exported",
72    host_supported: true,
73    visibility: [
74        // This has to be exported due to
75        // go/android-flags-howto-apis#test-infra-and-mainline-support, hence making this only
76        // visible to tests for now.
77        "//packages/modules/HealthFitness/tests:__subpackages__",
78    ],
79}
80
81java_aconfig_library {
82    name: "healthfitness-aconfig-flags-lib",
83    aconfig_declarations: "healthfitness-aconfig-flags",
84    min_sdk_version: "34",
85    apex_available: [
86        "com.android.healthfitness",
87    ],
88    defaults: ["framework-minus-apex-aconfig-java-defaults"],
89    visibility: [
90        "//packages/modules/HealthFitness:__subpackages__",
91    ],
92}
93
94java_library {
95    name: "healthfitness-aconfig-flags-helper",
96    sdk_version: "module_current",
97    min_sdk_version: "34",
98    srcs: [
99        "src/**/*.java",
100    ],
101    libs: [
102        "framework-annotations-lib",
103    ],
104    static_libs: [
105        "healthfitness-aconfig-flags-lib",
106    ],
107    apex_available: [
108        "com.android.healthfitness",
109    ],
110    visibility: [
111        "//packages/modules/HealthFitness:__subpackages__",
112    ],
113}
114