-
Notifications
You must be signed in to change notification settings - Fork 1
/
Android.bp
132 lines (124 loc) · 3.61 KB
/
Android.bp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
package {
default_team: "trendy_team_fwk_nfc",
default_applicable_licenses: ["Android-Apache-2.0"],
}
genrule {
name: "statslog-Nfc-java-gen",
tools: ["stats-log-api-gen"],
cmd: "$(location stats-log-api-gen) --java $(out) --module nfc --javaPackage com.android.nfc" +
" --javaClass NfcStatsLog",
out: ["com/android/nfc/NfcStatsLog.java"],
}
java_library {
name: "bluetooth-protos-nfc-enums-java-gen",
installable: false,
proto: {
type: "stream",
},
srcs: [
":srcs_bluetooth_protos_nfc",
],
apex_available: [
"//apex_available:platform",
"com.android.nfcservices",
],
min_sdk_version: "VanillaIceCream",
sdk_version: "module_current",
}
java_defaults {
name: "NfcNciDefaults",
static_libs: [
"android.se.omapi-V1-java",
"androidx.annotation_annotation",
"androidx.appcompat_appcompat",
"bluetooth-protos-nfc-enums-java-gen",
"com.google.android.material_material",
"modules-utils-fastxmlserializer",
"modules-utils-shell-command-handler",
"PlatformProperties",
"nfc_flags_lib",
],
privileged: true,
optimize: {
proguard_flags_files: ["proguard.flags"],
},
jarjar_rules: "jarjar-rules.txt",
privapp_allowlist: ":privapp_allowlist_com.android.nfc.xml",
}
// NCI Configuration used without NFC apex
// This version compiles against platform.
android_app {
name: "NfcNci",
defaults: ["NfcNciDefaults"],
certificate: "platform",
sdk_version: "core_platform",
srcs: [
"src/**/*.java",
"shim_src/non_apex/**/*.java",
"nci/**/*.java",
":framework-nfc-javastream-protos",
":statslog-Nfc-java-gen",
],
libs: [
// order matters: classes in framework-nfc are resolved before framework, meaning
// @hide APIs in framework-nfc are resolved before @SystemApi stubs in framework
"framework-nfc.impl",
"framework",
// if sdk_version="" this gets automatically included, but here we need to add manually.
"framework-res",
],
jni_libs: ["libnfc_nci_jni"],
}
// NCI Configuration embedded in NFC apex.
// This version compiles against SDK API's.
android_app {
name: "NfcNciApex",
defaults: ["NfcNciDefaults"],
min_sdk_version: "34", // should be 35 (making it 34 for compiling for `-next`)
sdk_version: "module_current",
certificate: "nfc",
srcs: [
"src/**/*.java",
"shim_src/apex/**/*.java",
"nci/**/*.java",
":framework-nfc-javastream-protos",
":statslog-Nfc-java-gen",
],
libs: [
"framework-annotations-lib",
"framework-bluetooth",
"framework-configinfrastructure",
"framework-nfc.impl",
"framework-permission-s",
"framework-permission",
"framework-statsd.stubs.module_lib",
"framework-wifi",
"android.nfc.flags-aconfig-java",
"android.permission.flags-aconfig-java",
"android.service.chooser.flags-aconfig-java",
"unsupportedappusage",
],
// prevent NfcNciApex from using product-specific resources
aaptflags: ["--product default"],
apex_available: [
"//apex_available:platform",
"com.android.nfcservices",
],
lint: {
baseline_filename: "lint-baseline.xml",
},
}
filegroup {
name: "nfc-sources",
srcs: [
"src/**/*.java",
":statslog-Nfc-java-gen",
],
visibility: [
"//packages/apps/Nfc/tests/unit",
],
}
filegroup {
name: "privapp_allowlist_com.android.nfc.xml",
srcs: ["com.android.nfc.xml"],
}