1# Copyright (C) 2023 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
15def _kind_api(kind, api_level):
16    return "config_setting_android_%s_%s" % (kind, api_level)
17
18def _kind_api_pre_java_9(kind, api_level):
19    return _kind_api(kind, api_level) + "_pre_java_9"
20
21def _kind_api_post_java_9(kind, api_level):
22    return _kind_api(kind, api_level) + "_post_java_9"
23
24_CONFIG_SETTING_SDK_NONE = "config_setting_sdk_none"
25_CONFIG_SETTING_PRE_JAVA_9 = "config_setting_pre_java_9"
26_CONFIG_SETTING_POST_JAVA_9 = "config_setting_post_java_9"
27
28config_setting_names = struct(
29    SDK_NONE = _CONFIG_SETTING_SDK_NONE,
30    PRE_JAVA_9 = _CONFIG_SETTING_PRE_JAVA_9,
31    POST_JAVA_9 = _CONFIG_SETTING_POST_JAVA_9,
32    kind_api = _kind_api,
33    kind_api_pre_java_9 = _kind_api_pre_java_9,
34    kind_api_post_java_9 = _kind_api_post_java_9,
35)
36