blob: 6d4472f9340521a6c7c6f4ceb30389821d6d0330 [file] [log] [blame]
Kenny Root923342a2016-09-22 17:04:35 -07001//
2// Copyright (C) 2016 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
Paul Duffina3891b02019-06-04 12:50:59 +010017package {
18 default_visibility: [
19 ":__subpackages__",
20 ],
21}
22
Colin Cross8024b112017-10-09 13:34:58 -070023//
24// Definitions for building the Conscrypt Java library, native code,
25// and associated tests.
26//
27
Neil Fullerde17f742018-09-25 11:48:05 +010028// Conscrypt is divided into subdirectories.
Colin Cross8024b112017-10-09 13:34:58 -070029//
30// The structure is:
31//
32// constants/
33// src/gen # Generates NativeConstants.java.
34// common/
35// src/main/java # Common Java source for all platforms.
36// src/jni/
37// main # Common C++ source for all platforms.
38// unbundled # C++ source used for OpenJDK and unbundled Android.
Adam Vartaniana0509172018-06-15 19:19:20 +010039// src/test/java # Common test files for all platforms.
Colin Cross8024b112017-10-09 13:34:58 -070040// android/
41// src/main/java # Java source for unbundled Android.
42// openjdk/
43// src/main/java # Java source for OpenJDK.
44// src/test
45// java/ # Java source for common tests.
46// resources/ # Support files for tests
47// platform/
48// src/main/java # Java source for bundled Android.
49// src/test
50// java/ # Java source for bundled tests.
51//
52
Kenny Root923342a2016-09-22 17:04:35 -070053cc_defaults {
54 name: "conscrypt_global",
55
56 cflags: [
57 "-Wall",
58 "-Wextra",
59 "-Werror",
60 "-Wunused",
61 ],
62
63 srcs: [
Tobias Thierer33b649f2019-01-22 20:59:36 +000064 "common/src/jni/main/cpp/conscrypt/compatibility_close_monitor.cc",
Nathan Mittlercd7a1582017-08-10 15:17:37 -070065 "common/src/jni/main/cpp/conscrypt/jniload.cc",
66 "common/src/jni/main/cpp/conscrypt/jniutil.cc",
Nathan Mittlerf8c8d4b2017-08-02 06:57:22 -070067 "common/src/jni/main/cpp/conscrypt/native_crypto.cc",
Nathan Mittlercd7a1582017-08-10 15:17:37 -070068 "common/src/jni/main/cpp/conscrypt/netutil.cc",
69 "common/src/jni/main/cpp/conscrypt/trace.cc",
nmittler7782d132016-11-22 11:34:01 -080070 ],
71
72 local_include_dirs: [
73 "common/src/jni/main/include",
Kenny Root923342a2016-09-22 17:04:35 -070074 ],
75
Kenny Root923342a2016-09-22 17:04:35 -070076 compile_multilib: "both",
77 stl: "c++_static",
78}
79
80cc_defaults {
Colin Cross8024b112017-10-09 13:34:58 -070081 name: "conscrypt_unbundled-jni-defaults",
Kenny Root923342a2016-09-22 17:04:35 -070082
Kenny Root923342a2016-09-22 17:04:35 -070083 local_include_dirs: [
nmittler7782d132016-11-22 11:34:01 -080084 "common/src/jni/unbundled/include",
Kenny Root923342a2016-09-22 17:04:35 -070085 ],
86
Kenny Root7bf42db2016-10-05 10:01:40 -070087 shared_libs: [
88 "liblog",
89 ],
90
Kenny Root923342a2016-09-22 17:04:35 -070091 static_libs: [
92 "libssl",
Colin Cross1b4bbbf2019-09-18 11:05:41 -070093 "libcrypto_static",
Kenny Root923342a2016-09-22 17:04:35 -070094 ],
95
96 sdk_version: "9",
97}
98
99cc_library {
100 name: "libconscrypt_jni",
Colin Cross8024b112017-10-09 13:34:58 -0700101 defaults: [
102 "conscrypt_global",
103 "conscrypt_unbundled-jni-defaults",
104 ],
Kenny Root923342a2016-09-22 17:04:35 -0700105}
106
107cc_library_host_shared {
108 name: "libconscrypt_openjdk_jni",
109 defaults: ["conscrypt_global"],
110
111 cflags: [
112 "-DCONSCRYPT_OPENJDK",
113 ],
114
Kenny Root923342a2016-09-22 17:04:35 -0700115 local_include_dirs: [
nmittler7782d132016-11-22 11:34:01 -0800116 "common/src/jni/unbundled/include",
Kenny Root923342a2016-09-22 17:04:35 -0700117 ],
118
Kenny Root923342a2016-09-22 17:04:35 -0700119 static_libs: [
Adam Vartanian9b0c0172017-08-16 16:44:17 +0100120 "libssl",
Colin Cross1b4bbbf2019-09-18 11:05:41 -0700121 "libcrypto_static",
Kenny Root923342a2016-09-22 17:04:35 -0700122 ],
123
124 // TODO: b/26097626. ASAN breaks use of this library in JVM.
125 // Re-enable sanitization when the issue with making clients of this library
126 // preload ASAN runtime is resolved. Without that, clients are getting runtime
127 // errors due to unresolved ASAN symbols, such as
128 // __asan_option_detect_stack_use_after_return.
129 sanitize: {
130 never: true,
131 },
132
Kenny Root7bf42db2016-10-05 10:01:40 -0700133 stl: "libc++_static",
Dan Willemsenc9d6d8f2019-01-04 16:13:27 -0800134
135 // The post-build signing tools need signapk.jar and its shared libs
136 multilib: {
137 lib64: {
138 dist: {
139 targets: ["droidcore"],
140 },
141 },
142 },
Kenny Root923342a2016-09-22 17:04:35 -0700143}
Colin Cross8024b112017-10-09 13:34:58 -0700144
145cc_binary_host {
146 name: "conscrypt_generate_constants",
147 srcs: ["constants/src/gen/cpp/generate_constants.cc"],
Chih-Hung Hsieh7a286142017-10-25 16:07:06 -0700148 cflags: [
149 "-Wall",
150 "-Werror",
151 ],
Colin Cross8024b112017-10-09 13:34:58 -0700152 shared_libs: [
153 "libcrypto",
154 "libssl",
155 ],
156}
157
158genrule {
Paul Duffin38fb8012019-09-20 15:55:58 +0100159 name: "conscrypt-unbundled_generated_constants",
Colin Cross8024b112017-10-09 13:34:58 -0700160 out: ["org/conscrypt/NativeConstants.java"],
161 cmd: "$(location conscrypt_generate_constants) > $(out)",
162 tools: ["conscrypt_generate_constants"],
163}
164
Paul Duffin31d1d152018-09-19 15:03:21 +0100165genrule {
166 name: "conscrypt_generated_constants",
167 out: ["com/android/org/conscrypt/NativeConstants.java"],
168 cmd: "$(location conscrypt_generate_constants) com.android.org.conscrypt > $(out)",
169 tools: ["conscrypt_generate_constants"],
170}
171
Neil Fuller3bf29f22018-09-24 17:35:33 +0100172filegroup {
173 name: "conscrypt_java_files",
174 srcs: [
175 "repackaged/common/src/main/java/**/*.java",
176 "repackaged/platform/src/main/java/**/*.java",
177 ":conscrypt_generated_constants",
178 ],
179}
180
Adam Vartanianacc0e552018-10-18 10:09:22 +0100181filegroup {
182 name: "conscrypt_public_api_files",
Paul Duffinc2e15cd2019-03-28 14:26:40 +0000183 srcs: ["publicapi/src/main/java/**/*.java"],
Jiyong Park956d12f2019-09-13 20:47:19 +0900184 path: "publicapi/src/main/java",
Adam Vartanianacc0e552018-10-18 10:09:22 +0100185}
186
Paul Duffin31d1d152018-09-19 15:03:21 +0100187// Create the conscrypt library from the source produced by the srcgen/generate_android_src.sh
188// script.
Colin Cross8024b112017-10-09 13:34:58 -0700189java_library {
190 name: "conscrypt",
Paul Duffinc2e15cd2019-03-28 14:26:40 +0000191 visibility: [
Paul Duffina3891b02019-06-04 12:50:59 +0100192 "//art/build",
193 "//device:__subpackages__",
Paul Duffinc2e15cd2019-03-28 14:26:40 +0000194 "//external/robolectric-shadows",
Paul Duffinc2e15cd2019-03-28 14:26:40 +0000195 "//system/apex/tests",
196 ":__subpackages__",
197 ],
Jiyong Park59e066f2019-12-02 13:58:22 +0900198 apex_available: [
199 "com.android.conscrypt",
200 "test_com.android.conscrypt",
201 ],
Jooyung Han1d643552020-04-16 18:48:26 +0900202 // Conscrypt should support Q
203 min_sdk_version: "29",
204
Colin Cross291db152018-06-27 11:00:08 -0700205 installable: true,
Colin Cross8024b112017-10-09 13:34:58 -0700206 hostdex: true,
Neil Fullera179d2b2018-09-11 18:43:08 +0100207
Adam Vartanianacc0e552018-10-18 10:09:22 +0100208 srcs: [
209 ":conscrypt_java_files",
210 ":conscrypt_public_api_files",
211 ],
Neil Fullera179d2b2018-09-11 18:43:08 +0100212
Artur Satayev1c258292019-12-10 12:08:51 +0000213 libs: ["unsupportedappusage"],
214
Neil Fuller2f117722018-09-26 16:14:23 +0100215 // Conscrypt can be updated independently from the other core libraries so it must only depend
216 // on public SDK and intra-core APIs.
Paul Duffin1f66bef2019-06-12 11:04:35 +0100217 sdk_version: "none",
Paul Duffin8e719de2019-10-02 12:19:33 +0100218 system_modules: "art-module-intra-core-api-stubs-system-modules",
Paul Duffin9cc43592019-09-20 14:37:14 +0100219 patch_module: "java.base",
Neil Fullera179d2b2018-09-11 18:43:08 +0100220
Pete Bentleye58b81d2019-04-15 17:48:45 +0100221 // Workaround for b/124476339: libjavacrypto is required for both APEX and
222 // hostdex builds, but adding a top-level required property results in
223 // it being installed to /system on Android.
224 // TODO(b/124476339): move required back to a top level property
225 target: {
Tobias Thierer52344592019-09-02 17:32:02 +0100226 // boringssl_self_test needed in both /system/bin and /apex/com.android.conscrypt/bin
227 android: {
228 required: ["boringssl_self_test"],
229 },
Pete Bentleye58b81d2019-04-15 17:48:45 +0100230 hostdex: {
231 required: ["libjavacrypto"],
Paul Duffin85d46c02019-06-25 12:06:26 +0100232 },
Pete Bentleye58b81d2019-04-15 17:48:45 +0100233 },
234
Vladimir Markof68e5092019-04-02 10:28:43 +0100235 permitted_packages: [
236 "android.net.ssl",
237 "com.android.org.conscrypt",
238 ],
Kun Niu7fd0a4b2019-07-02 10:16:55 -0700239
240 plugins: ["java_api_finder"],
Colin Cross8024b112017-10-09 13:34:58 -0700241}
242
Paul Duffin7d1915d2019-12-24 09:22:30 +0000243// Referenced implicitly from conscrypt.module.platform.api.
244filegroup {
245 name: "conscrypt.module.platform.api.api.public.latest",
Paul Duffinbe619e82019-10-03 13:50:13 +0100246 srcs: [
Paul Duffin7d1915d2019-12-24 09:22:30 +0000247 "api/platform/last-api.txt",
Paul Duffinbe619e82019-10-03 13:50:13 +0100248 ],
Paul Duffin7d1915d2019-12-24 09:22:30 +0000249}
Paul Duffinbe619e82019-10-03 13:50:13 +0100250
Paul Duffin7d1915d2019-12-24 09:22:30 +0000251// Referenced implicitly from conscrypt.module.platform.api.
252filegroup {
253 name: "conscrypt.module.platform.api-removed.api.public.latest",
254 srcs: [
255 "api/platform/last-removed.txt",
256 ],
Paul Duffinbe619e82019-10-03 13:50:13 +0100257}
258
259// A library containing the core platform API stubs of the Conscrypt module.
260//
261// Core platform APIs are only intended for use of other parts of the platform, not the
262// core library modules.
Paul Duffin7d1915d2019-12-24 09:22:30 +0000263//
264// The API specification .txt files managed by this only contain the additional
265// classes/members that are in the platform API but which are not in the public
266// API.
267java_sdk_library {
268 name: "conscrypt.module.platform.api",
Paul Duffinbe619e82019-10-03 13:50:13 +0100269 visibility: [
Paul Duffina938a162019-10-04 15:34:31 +0100270 "//external/wycheproof",
Paul Duffinbe619e82019-10-03 13:50:13 +0100271 "//libcore:__subpackages__",
272 ],
273 srcs: [
Paul Duffin7d1915d2019-12-24 09:22:30 +0000274 ":conscrypt_java_files",
275 ],
276 api_dir: "api/platform",
277 api_only: true,
278 droiddoc_options: [
279 "--hide-annotation libcore.api.Hide",
280 "--show-single-annotation libcore.api.CorePlatformApi",
281 "--skip-annotation-instance-methods=false",
Paul Duffinbe619e82019-10-03 13:50:13 +0100282 ],
283 hostdex: true,
284
285 sdk_version: "none",
286 system_modules: "art-module-platform-api-stubs-system-modules",
287}
288
Colin Cross8024b112017-10-09 13:34:58 -0700289// A guaranteed unstripped version of conscrypt.
290// The build system may or may not strip the conscrypt jar, but this one will
291// not be stripped. See b/24535627.
292java_library {
293 name: "conscrypt-testdex",
Colin Cross291db152018-06-27 11:00:08 -0700294 installable: true,
Neil Fullera179d2b2018-09-11 18:43:08 +0100295
Paul Duffin31d1d152018-09-19 15:03:21 +0100296 static_libs: ["conscrypt"],
Vladimir Marko9f0e6cc2018-12-04 10:20:45 +0000297 dex_preopt: {
298 enabled: false,
299 },
Neil Fullera179d2b2018-09-11 18:43:08 +0100300
Paul Duffin4f625e22019-06-12 13:45:01 +0100301 sdk_version: "core_platform",
Neil Fullera179d2b2018-09-11 18:43:08 +0100302
Neil Fullera179d2b2018-09-11 18:43:08 +0100303 required: ["libjavacrypto"],
Colin Cross8024b112017-10-09 13:34:58 -0700304}
305
Paul Duffinb5abd282020-04-08 23:59:02 +0100306// Referenced implicitly from conscrypt.module.public.api.
307filegroup {
308 name: "conscrypt.module.public.api.api.public.latest",
309 srcs: [
310 "api/public/last-api.txt",
311 ],
312}
313
314// Referenced implicitly from conscrypt.module.public.api.
315filegroup {
316 name: "conscrypt.module.public.api-removed.api.public.latest",
317 srcs: [
318 "api/public/last-removed.txt",
319 ],
320}
321
322// A library containing the public API stubs of the Conscrypt module.
323java_sdk_library {
324 name: "conscrypt.module.public.api",
Paul Duffin6fa05ed2019-10-03 16:01:06 +0100325 visibility: [
Paul Duffin064457d2020-03-26 15:35:44 +0000326 "//frameworks/base",
Paul Duffinb5abd282020-04-08 23:59:02 +0100327 "//libcore",
Paul Duffin6fa05ed2019-10-03 16:01:06 +0100328 ],
Paul Duffin0f6ed702019-09-27 14:55:06 +0100329 srcs: [
330 ":conscrypt_public_api_files",
331 ],
Paul Duffinb5abd282020-04-08 23:59:02 +0100332 api_dir: "api/public",
333 api_only: true,
334 droiddoc_options: [
335 // Emit nullability annotations from the source to the stub files.
336 "--include-annotations",
Paul Duffin0f6ed702019-09-27 14:55:06 +0100337 ],
Paul Duffinb5abd282020-04-08 23:59:02 +0100338
339 java_version: "1.9",
340
Paul Duffin0f6ed702019-09-27 14:55:06 +0100341 sdk_version: "none",
342 system_modules: "art-module-public-api-stubs-system-modules",
343}
344
Paul Duffin067f1c02019-12-24 20:59:54 +0000345// Referenced implicitly from conscrypt.module.intra.core.api.
346filegroup {
347 name: "conscrypt.module.intra.core.api.api.public.latest",
Paul Duffin70fd0372019-10-02 11:07:56 +0100348 srcs: [
Paul Duffin067f1c02019-12-24 20:59:54 +0000349 "api/intra/last-api.txt",
Paul Duffin70fd0372019-10-02 11:07:56 +0100350 ],
Paul Duffin067f1c02019-12-24 20:59:54 +0000351}
Paul Duffin70fd0372019-10-02 11:07:56 +0100352
Paul Duffin067f1c02019-12-24 20:59:54 +0000353// Referenced implicitly from conscrypt.module.intra.core.api.
354filegroup {
355 name: "conscrypt.module.intra.core.api-removed.api.public.latest",
356 srcs: [
357 "api/intra/last-removed.txt",
358 ],
Paul Duffin70fd0372019-10-02 11:07:56 +0100359}
360
361// A library containing the intra-core API stubs of the Conscrypt module.
362//
363// Intra-core APIs are only intended for the use of other core library modules.
Paul Duffin067f1c02019-12-24 20:59:54 +0000364//
365// The API specification .txt files managed by this only contain the additional
366// classes/members that are in the intra-core API but which are not the public API.
367java_sdk_library {
368 name: "conscrypt.module.intra.core.api",
Paul Duffin70fd0372019-10-02 11:07:56 +0100369 visibility: [
Paul Duffin30fbc052019-10-02 14:01:49 +0100370 "//external/okhttp",
Paul Duffin70fd0372019-10-02 11:07:56 +0100371 "//libcore:__subpackages__",
372 ],
373 srcs: [
Paul Duffin067f1c02019-12-24 20:59:54 +0000374 ":conscrypt_java_files",
375 ":conscrypt_public_api_files",
376 ],
377 api_dir: "api/intra",
378 api_only: true,
379 droiddoc_options: [
380 "--hide-annotation libcore.api.Hide",
381 "--show-single-annotation libcore.api.IntraCoreApi",
382 "--skip-annotation-instance-methods=false",
Paul Duffin70fd0372019-10-02 11:07:56 +0100383 ],
384
385 sdk_version: "none",
386 system_modules: "art-module-intra-core-api-stubs-system-modules",
387}
388
Colin Cross8024b112017-10-09 13:34:58 -0700389// Platform conscrypt crypto JNI library
390cc_defaults {
391 name: "libjavacrypto-defaults",
392
393 cflags: [
394 "-Wall",
395 "-Wextra",
396 "-Werror",
397 "-Wunused",
398 "-fvisibility=hidden",
399 ],
400
401 srcs: ["common/src/jni/main/cpp/**/*.cc"],
Colin Cross8024b112017-10-09 13:34:58 -0700402 local_include_dirs: ["common/src/jni/main/include"],
403}
404
405// Platform conscrypt crypto JNI library
406cc_library_shared {
407 name: "libjavacrypto",
408 host_supported: true,
409 defaults: ["libjavacrypto-defaults"],
410
411 cflags: ["-DJNI_JARJAR_PREFIX=com/android/"],
Orion Hodsonb5e43bd2019-01-27 10:57:34 +0000412 header_libs: ["libnativehelper_header_only"],
Colin Cross8024b112017-10-09 13:34:58 -0700413 shared_libs: [
414 "libcrypto",
Colin Cross8024b112017-10-09 13:34:58 -0700415 "liblog",
Colin Cross8024b112017-10-09 13:34:58 -0700416 "libssl",
417 ],
418
419 target: {
420 darwin: {
421 enabled: false,
422 },
Colin Cross17b0d182020-02-19 17:04:44 -0800423 android: {
424 runtime_libs: ["libandroidio"],
425 },
426 not_windows: {
427 runtime_libs: ["libandroidio"],
428 },
Colin Cross8024b112017-10-09 13:34:58 -0700429 },
Jiyong Park59e066f2019-12-02 13:58:22 +0900430 apex_available: [
431 "com.android.conscrypt",
432 "test_com.android.conscrypt",
433 ],
Jooyung Han1d643552020-04-16 18:48:26 +0900434 min_sdk_version: "29",
Colin Cross8024b112017-10-09 13:34:58 -0700435}
436
Michael Groover68c477b2020-07-16 20:32:13 -0700437// Unbundled Conscrypt jar for use by signapk and apksigner tool
Paul Duffin38fb8012019-09-20 15:55:58 +0100438//
439// Builds against standard host libraries.
440java_library_host {
441 name: "conscrypt-unbundled",
442 visibility: [
443 "//build/make/tools/signapk",
Michael Groover68c477b2020-07-16 20:32:13 -0700444 "//tools/apksig",
Paul Duffin38fb8012019-09-20 15:55:58 +0100445 ],
Colin Cross8024b112017-10-09 13:34:58 -0700446 srcs: [
447 "common/src/main/java/**/*.java",
Paul Duffin38fb8012019-09-20 15:55:58 +0100448 "openjdk/src/main/java/**/*.java",
449 ":conscrypt-unbundled_generated_constants",
Colin Cross8024b112017-10-09 13:34:58 -0700450 ],
Paul Duffin38fb8012019-09-20 15:55:58 +0100451 javacflags: ["-XDignore.symbol.file"],
Colin Cross8024b112017-10-09 13:34:58 -0700452 java_version: "1.7",
453}
454
455// Static unbundled Conscrypt crypto JNI library
456cc_library_static {
457 name: "libconscrypt_static",
458 defaults: ["libjavacrypto-defaults"],
459
460 cflags: [
461 "-DJNI_JARJAR_PREFIX=com/google/android/gms/",
462 "-DCONSCRYPT_UNBUNDLED",
463 "-DSTATIC_LIB",
464 ],
465
466 local_include_dirs: ["common/src/jni/unbundled/include"],
467
468 static_libs: [
469 "libssl",
Colin Cross1b4bbbf2019-09-18 11:05:41 -0700470 "libcrypto_static",
Colin Cross8024b112017-10-09 13:34:58 -0700471 ],
472 sdk_version: "9",
473 stl: "c++_shared",
474}
Colin Crossf569ee32018-09-11 22:38:08 -0700475
Colin Crossf569ee32018-09-11 22:38:08 -0700476// Make the conscrypt-tests library.
477java_test {
478 name: "conscrypt-tests",
Paul Duffina3891b02019-06-04 12:50:59 +0100479 visibility: [
480 "//cts/tests/libcore/luni",
Automerger Merge Worker400af962020-02-24 12:55:30 +0000481 "//external/conscrypt/apex/tests",
Paul Duffina3891b02019-06-04 12:50:59 +0100482 ],
Colin Crossf569ee32018-09-11 22:38:08 -0700483 hostdex: true,
484 srcs: [
Paul Duffin31d1d152018-09-19 15:03:21 +0100485 "repackaged/platform/src/test/java/**/*.java",
486 "repackaged/common/src/test/java/**/*.java",
Paul Duffin31d1d152018-09-19 15:03:21 +0100487 "repackaged/testing/src/main/java/**/*.java",
Adam Vartanianacc0e552018-10-18 10:09:22 +0100488 "publicapi/src/test/java/**/*.java",
Colin Crossf569ee32018-09-11 22:38:08 -0700489 ],
490 java_resource_dirs: [
Paul Duffin31d1d152018-09-19 15:03:21 +0100491 // Resource directories do not need repackaging.
Colin Crossf569ee32018-09-11 22:38:08 -0700492 "openjdk/src/test/resources",
Pete Bentley3914ba72019-09-27 11:57:50 +0100493 "common/src/test/resources",
Colin Crossf569ee32018-09-11 22:38:08 -0700494 ],
Neil Fuller27e690d2018-10-10 12:58:01 +0100495
Paul Duffin1f66bef2019-06-12 11:04:35 +0100496 sdk_version: "none",
Paul Duffin8e719de2019-10-02 12:19:33 +0100497 system_modules: "art-module-intra-core-api-stubs-system-modules",
Colin Crossf569ee32018-09-11 22:38:08 -0700498 libs: [
Neil Fuller719e00f2018-10-19 09:32:43 +0100499 "conscrypt",
Paul Duffin880d5422019-09-24 16:22:04 +0100500 "core-test-rules",
Colin Crossf569ee32018-09-11 22:38:08 -0700501 "junit",
502 "mockito-target-minus-junit4",
503 ],
Neil Fuller27e690d2018-10-10 12:58:01 +0100504
Colin Crossf569ee32018-09-11 22:38:08 -0700505 static_libs: [
Colin Crossf569ee32018-09-11 22:38:08 -0700506 "bouncycastle-unbundled",
507 "bouncycastle-bcpkix-unbundled",
508 "bouncycastle-ocsp-unbundled",
509 ],
510 javacflags: [
511 "-Xmaxwarns 9999999",
512 //"-Xlint:all",
513 //"-Xlint:-serial,-deprecation,-unchecked",
514 ],
515
516 required: ["libjavacrypto"],
Colin Crossf569ee32018-09-11 22:38:08 -0700517 java_version: "1.7",
518}
519
520// Make the conscrypt-benchmarks library.
521java_test {
522 name: "conscrypt-benchmarks",
523 srcs: [
Paul Duffin31d1d152018-09-19 15:03:21 +0100524 "repackaged/testing/src/main/java/**/*.java",
525 "repackaged/benchmark-base/src/main/java/**/*.java",
526 "repackaged/benchmark-android/src/main/java/**/*.java",
Colin Crossf569ee32018-09-11 22:38:08 -0700527 ],
Paul Duffin1f66bef2019-06-12 11:04:35 +0100528 sdk_version: "none",
Paul Duffin8e719de2019-10-02 12:19:33 +0100529 system_modules: "art-module-intra-core-api-stubs-system-modules",
Colin Crossf569ee32018-09-11 22:38:08 -0700530 libs: [
Neil Fuller719e00f2018-10-19 09:32:43 +0100531 "conscrypt",
Colin Crossf569ee32018-09-11 22:38:08 -0700532 "junit",
533 "bouncycastle-unbundled",
534 "bouncycastle-bcpkix-unbundled",
535 "bouncycastle-ocsp-unbundled",
536 "caliper-api-target",
537 ],
Neil Fuller5d272352018-10-12 22:10:57 +0100538
Colin Crossf569ee32018-09-11 22:38:08 -0700539 javacflags: [
540 "-Xmaxwarns 9999999",
541 //"-Xlint:all",
542 //"-Xlint:-serial,-deprecation,-unchecked",
543 ],
544
545 required: ["libjavacrypto"],
Colin Crossf569ee32018-09-11 22:38:08 -0700546 java_version: "1.7",
547}
Paul Duffin403d5052019-11-25 19:56:01 +0000548
549// Device SDK exposed by the Conscrypt module.
550sdk {
551 name: "conscrypt-module-sdk",
Paul Duffin990ebd12020-04-09 21:44:10 +0100552 java_sdk_libs: [
553 "conscrypt.module.public.api",
554 "conscrypt.module.intra.core.api",
555 "conscrypt.module.platform.api",
Paul Duffin403d5052019-11-25 19:56:01 +0000556 ],
557 native_shared_libs: [
558 "libconscrypt_jni",
559 ],
Paul Duffin403d5052019-11-25 19:56:01 +0000560}
Paul Duffinb3fbef32019-12-09 13:42:13 +0000561
Paul Duffin414f5232019-12-16 20:30:20 +0000562// Host tools exported by the Conscrypt module.
563module_exports {
564 name: "conscrypt-module-host-exports",
Paul Duffinb3fbef32019-12-09 13:42:13 +0000565 host_supported: true,
566 device_supported: false,
567 java_libs: [
568 "conscrypt-unbundled",
569 ],
570}
Paul Duffin538cb632019-12-09 13:41:08 +0000571
572// Test libraries exposed by the Conscrypt module.
573module_exports {
574 name: "conscrypt-module-test-exports",
575 java_libs: [
576 // For use by robolectric.
577 "conscrypt",
578 // For use by art tests
579 "conscrypt-testdex",
580 ],
581 java_tests: [
582 // For use by CTS
583 "conscrypt-tests",
584 ],
585}