xref: /aosp_15_r20/external/anonymous-counting-tokens/Android.bp (revision a26f13018b999b025c962678da434c0a5aec4dae)
1package {
2    default_visibility : ["//visibility:private"],
3    default_applicable_licenses: ["libact_license"],
4}
5
6license {
7    name: "libact_license",
8    visibility: [":__subpackages__"],
9    license_kinds: ["SPDX-license-identifier-Apache-2.0"],
10    license_text: ["LICENSE"],
11}
12
13filegroup {
14    name: "act-proto",
15    srcs: [
16        "act/**/*.proto",
17    ],
18    visibility: ["//packages/modules/AdServices:__subpackages__"],
19    path: "act",
20}
21
22cc_defaults {
23    name: "libact_defaults",
24    host_supported: true,
25}
26
27cc_library_static {
28    name: "libact",
29    defaults: ["libact_defaults"],
30    min_sdk_version: "30",
31    sdk_version: "current",
32    stl: "libc++_static",
33    srcs: [
34      "act/act.proto",
35      "act/act_v0/act_v0.cc",
36      "act/act_v0/act_v0.proto",
37      "act/act_v0/parameters.cc",
38      "act/util.proto",
39    ],
40    shared_libs: [
41      "libcrypto",
42      "liblog",
43    ],
44    whole_static_libs: [
45      "libpjc_crypto",
46      "libpjc_third_party_libabsl",
47    ],
48    cflags: ["-Wno-unused-parameter"],
49    export_include_dirs: ["."],
50    include_dirs: [
51      "external/protobuf",
52      "external/protobuf/src",
53    ],
54    proto: {
55      type: "lite",
56      export_proto_headers: true,
57      local_include_dirs: [
58        ".",
59      ],
60      include_dirs: [
61        "external/private-join-and-compute",
62        "external/protobuf",
63        "external/protobuf/src",
64      ]
65    },
66    sanitize: {
67      integer_overflow: true,
68      misc_undefined: ["bounds"],
69    },
70    apex_available: ["com.android.adservices", "com.android.extservices",],
71    visibility: [
72    	"//packages/modules/AdServices:__subpackages__",
73    ],
74    target: {
75	android: {
76	    whole_static_libs: [
77	        "libprotobuf-cpp-lite-ndk",
78	    ]
79	}
80    }
81}
82
83cc_test {
84    name: "libact_fake_act_test",
85    defaults: ["libact_defaults"],
86    srcs: [
87      "act/fake_act.cc",
88      "act/fake_act_test.cc",
89    ],
90    shared_libs: [
91      "libcrypto",
92      "liblog",
93      "libprotobuf-cpp-lite",
94    ],
95    static_libs: [
96      "libpjc_crypto",
97      "libact",
98      "libgmock",
99      "libpjc_third_party_libabsl",
100    ],
101    cflags: ["-Wno-unused-parameter"],
102}
103
104cc_test {
105    name: "libact_test",
106    defaults: ["libact_defaults"],
107    srcs: [
108      "act/act_v0/act_v0_test.cc",
109    ],
110    shared_libs: [
111      "libcrypto",
112      "liblog",
113      "libprotobuf-cpp-lite",
114    ],
115    static_libs: [
116      "libpjc_crypto",
117      "libact",
118      "libgmock",
119      "libpjc_third_party_libabsl",
120    ],
121    cflags: ["-Wno-unused-parameter"],
122    test_suites: ["general-tests"],
123}
124
125// This test times out.
126cc_test {
127    name: "libact_parameters_test",
128    defaults: ["libact_defaults"],
129    enabled: false,
130    srcs: [
131      "act/act_v0/parameters_test.cc",
132    ],
133    shared_libs: [
134      "libcrypto",
135      "liblog",
136      "libprotobuf-cpp-lite",
137    ],
138    static_libs: [
139      "libpjc_crypto",
140      "libact",
141      "libgmock",
142      "libpjc_third_party_libabsl",
143    ],
144    cflags: ["-Wno-unused-parameter"],
145}
146