xref: /aosp_15_r20/build/soong/android/api_domain.go (revision 333d2b3687b3a337dbcca9d65000bca186795e39)
1// Copyright 2022 Google Inc. All rights reserved.
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 android
16
17type ApiSurface int
18
19// TODO(b/246656800): Reconcile with android.SdkKind
20const (
21	// API surface provided by platform and mainline modules to other mainline modules
22	ModuleLibApi ApiSurface = iota
23	PublicApi               // Aka NDK
24	VendorApi               // Aka LLNDK
25)
26
27func (a ApiSurface) String() string {
28	switch a {
29	case ModuleLibApi:
30		return "module-libapi"
31	case PublicApi:
32		return "publicapi"
33	case VendorApi:
34		return "vendorapi"
35	default:
36		return "invalid"
37	}
38}
39