blob: eef032099d149f8adfb99d78d21985a9a7dcf414 [file] [log] [blame]
Paul Duffinc6bb7cf2021-04-08 17:49:27 +01001// Copyright (C) 2021 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 java
16
17import (
18 "android/soong/android"
19)
20
21// Contains support for processing hiddenAPI in a modular fashion.
22
23// hiddenAPIAugmentationInfo contains paths to the files that can be used to augment the information
24// obtained from annotations within the source code in order to create the complete set of flags
25// that should be applied to the dex implementation jars on the bootclasspath.
26//
27// Each property contains a list of paths. With the exception of the Unsupported_packages the paths
28// of each property reference a plain text file that contains a java signature per line. The flags
29// for each of those signatures will be updated in a property specific way.
30//
31// The Unsupported_packages property contains a list of paths, each of which is a plain text file
32// with one Java package per line. All members of all classes within that package (but not nested
33// packages) will be updated in a property specific way.
34type hiddenAPIAugmentationInfo struct {
35 // Marks each signature in the referenced files as being unsupported.
36 Unsupported android.Paths
37
38 // Marks each signature in the referenced files as being unsupported because it has been removed.
39 // Any conflicts with other flags are ignored.
40 Removed android.Paths
41
42 // Marks each signature in the referenced files as being supported only for targetSdkVersion <= R
43 // and low priority.
44 Max_target_r_low_priority android.Paths
45
46 // Marks each signature in the referenced files as being supported only for targetSdkVersion <= Q.
47 Max_target_q android.Paths
48
49 // Marks each signature in the referenced files as being supported only for targetSdkVersion <= P.
50 Max_target_p android.Paths
51
52 // Marks each signature in the referenced files as being supported only for targetSdkVersion <= O
53 // and low priority. Any conflicts with other flags are ignored.
54 Max_target_o_low_priority android.Paths
55
56 // Marks each signature in the referenced files as being blocked.
57 Blocked android.Paths
58
59 // Marks each signature in every package in the referenced files as being unsupported.
60 Unsupported_packages android.Paths
61}