Kenny Root | 923342a | 2016-09-22 17:04:35 -0700 | [diff] [blame] | 1 | // |
| 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 Duffin | a3891b0 | 2019-06-04 12:50:59 +0100 | [diff] [blame] | 17 | package { |
| 18 | default_visibility: [ |
| 19 | ":__subpackages__", |
| 20 | ], |
Bob Badour | 808f822 | 2021-02-12 15:19:10 -0800 | [diff] [blame] | 21 | default_applicable_licenses: ["external_conscrypt_license"], |
| 22 | } |
| 23 | |
| 24 | // Added automatically by a large-scale-change that took the approach of |
| 25 | // 'apply every license found to every target'. While this makes sure we respect |
| 26 | // every license restriction, it may not be entirely correct. |
| 27 | // |
| 28 | // e.g. GPL in an MIT project might only apply to the contrib/ directory. |
| 29 | // |
| 30 | // Please consider splitting the single license below into multiple licenses, |
| 31 | // taking care not to lose any license_kind information, and overriding the |
| 32 | // default license using the 'licenses: [...]' property on targets as needed. |
| 33 | // |
| 34 | // For unused files, consider creating a 'fileGroup' with "//visibility:private" |
| 35 | // to attach the license to, and including a comment whether the files may be |
| 36 | // used in the current project. |
| 37 | // |
| 38 | // large-scale-change included anything that looked like it might be a license |
| 39 | // text as a license_text. e.g. LICENSE, NOTICE, COPYING etc. |
| 40 | // |
| 41 | // Please consider removing redundant or irrelevant files from 'license_text:'. |
| 42 | // See: http://go/android-license-faq |
| 43 | license { |
| 44 | name: "external_conscrypt_license", |
| 45 | visibility: [":__subpackages__"], |
| 46 | license_kinds: [ |
| 47 | "SPDX-license-identifier-Apache-2.0", |
| 48 | "legacy_unencumbered", |
| 49 | ], |
| 50 | license_text: [ |
| 51 | "LICENSE", |
| 52 | "NOTICE", |
| 53 | "licenses/**/*", |
| 54 | ], |
Paul Duffin | a3891b0 | 2019-06-04 12:50:59 +0100 | [diff] [blame] | 55 | } |
| 56 | |
Colin Cross | 8024b11 | 2017-10-09 13:34:58 -0700 | [diff] [blame] | 57 | // |
| 58 | // Definitions for building the Conscrypt Java library, native code, |
| 59 | // and associated tests. |
| 60 | // |
| 61 | |
Neil Fuller | de17f74 | 2018-09-25 11:48:05 +0100 | [diff] [blame] | 62 | // Conscrypt is divided into subdirectories. |
Colin Cross | 8024b11 | 2017-10-09 13:34:58 -0700 | [diff] [blame] | 63 | // |
| 64 | // The structure is: |
| 65 | // |
| 66 | // constants/ |
| 67 | // src/gen # Generates NativeConstants.java. |
| 68 | // common/ |
| 69 | // src/main/java # Common Java source for all platforms. |
| 70 | // src/jni/ |
| 71 | // main # Common C++ source for all platforms. |
| 72 | // unbundled # C++ source used for OpenJDK and unbundled Android. |
Adam Vartanian | a050917 | 2018-06-15 19:19:20 +0100 | [diff] [blame] | 73 | // src/test/java # Common test files for all platforms. |
Colin Cross | 8024b11 | 2017-10-09 13:34:58 -0700 | [diff] [blame] | 74 | // android/ |
| 75 | // src/main/java # Java source for unbundled Android. |
| 76 | // openjdk/ |
| 77 | // src/main/java # Java source for OpenJDK. |
| 78 | // src/test |
| 79 | // java/ # Java source for common tests. |
| 80 | // resources/ # Support files for tests |
| 81 | // platform/ |
| 82 | // src/main/java # Java source for bundled Android. |
| 83 | // src/test |
| 84 | // java/ # Java source for bundled tests. |
| 85 | // |
| 86 | |
Kenny Root | 923342a | 2016-09-22 17:04:35 -0700 | [diff] [blame] | 87 | cc_defaults { |
| 88 | name: "conscrypt_global", |
| 89 | |
| 90 | cflags: [ |
| 91 | "-Wall", |
| 92 | "-Wextra", |
| 93 | "-Werror", |
| 94 | "-Wunused", |
| 95 | ], |
| 96 | |
| 97 | srcs: [ |
Tobias Thierer | 33b649f | 2019-01-22 20:59:36 +0000 | [diff] [blame] | 98 | "common/src/jni/main/cpp/conscrypt/compatibility_close_monitor.cc", |
Nathan Mittler | cd7a158 | 2017-08-10 15:17:37 -0700 | [diff] [blame] | 99 | "common/src/jni/main/cpp/conscrypt/jniload.cc", |
| 100 | "common/src/jni/main/cpp/conscrypt/jniutil.cc", |
Nathan Mittler | f8c8d4b | 2017-08-02 06:57:22 -0700 | [diff] [blame] | 101 | "common/src/jni/main/cpp/conscrypt/native_crypto.cc", |
Nathan Mittler | cd7a158 | 2017-08-10 15:17:37 -0700 | [diff] [blame] | 102 | "common/src/jni/main/cpp/conscrypt/netutil.cc", |
Pete Bentley | 0577986 | 2022-04-13 11:54:29 +0000 | [diff] [blame] | 103 | "common/src/jni/main/cpp/conscrypt/trace.cc", |
nmittler | 7782d13 | 2016-11-22 11:34:01 -0800 | [diff] [blame] | 104 | ], |
| 105 | |
Orion Hodson | 9af9e36 | 2020-04-03 06:47:07 +0100 | [diff] [blame] | 106 | header_libs: ["jni_headers"], |
| 107 | |
nmittler | 7782d13 | 2016-11-22 11:34:01 -0800 | [diff] [blame] | 108 | local_include_dirs: [ |
| 109 | "common/src/jni/main/include", |
Kenny Root | 923342a | 2016-09-22 17:04:35 -0700 | [diff] [blame] | 110 | ], |
| 111 | |
Kenny Root | 923342a | 2016-09-22 17:04:35 -0700 | [diff] [blame] | 112 | compile_multilib: "both", |
| 113 | stl: "c++_static", |
| 114 | } |
| 115 | |
| 116 | cc_defaults { |
Colin Cross | 8024b11 | 2017-10-09 13:34:58 -0700 | [diff] [blame] | 117 | name: "conscrypt_unbundled-jni-defaults", |
Kenny Root | 923342a | 2016-09-22 17:04:35 -0700 | [diff] [blame] | 118 | |
Kenny Root | 923342a | 2016-09-22 17:04:35 -0700 | [diff] [blame] | 119 | local_include_dirs: [ |
nmittler | 7782d13 | 2016-11-22 11:34:01 -0800 | [diff] [blame] | 120 | "common/src/jni/unbundled/include", |
Kenny Root | 923342a | 2016-09-22 17:04:35 -0700 | [diff] [blame] | 121 | ], |
| 122 | |
Orion Hodson | 9af9e36 | 2020-04-03 06:47:07 +0100 | [diff] [blame] | 123 | header_libs: ["jni_headers"], |
| 124 | |
Kenny Root | 7bf42db | 2016-10-05 10:01:40 -0700 | [diff] [blame] | 125 | shared_libs: [ |
| 126 | "liblog", |
| 127 | ], |
| 128 | |
Kenny Root | 923342a | 2016-09-22 17:04:35 -0700 | [diff] [blame] | 129 | static_libs: [ |
| 130 | "libssl", |
Colin Cross | 1b4bbbf | 2019-09-18 11:05:41 -0700 | [diff] [blame] | 131 | "libcrypto_static", |
Kenny Root | 923342a | 2016-09-22 17:04:35 -0700 | [diff] [blame] | 132 | ], |
| 133 | |
| 134 | sdk_version: "9", |
| 135 | } |
| 136 | |
| 137 | cc_library { |
| 138 | name: "libconscrypt_jni", |
Colin Cross | 8024b11 | 2017-10-09 13:34:58 -0700 | [diff] [blame] | 139 | defaults: [ |
| 140 | "conscrypt_global", |
| 141 | "conscrypt_unbundled-jni-defaults", |
| 142 | ], |
Kenny Root | 923342a | 2016-09-22 17:04:35 -0700 | [diff] [blame] | 143 | } |
| 144 | |
| 145 | cc_library_host_shared { |
| 146 | name: "libconscrypt_openjdk_jni", |
Colin Cross | 8a7ef9d | 2020-12-02 11:39:02 -0800 | [diff] [blame] | 147 | visibility: [ |
| 148 | "//build/make/tools/signapk", |
| 149 | "//tools/apksig", |
Kwang-un Jin | 6d1d226 | 2021-05-14 08:10:00 +0000 | [diff] [blame] | 150 | "//vendor:__subpackages__", |
Colin Cross | 8a7ef9d | 2020-12-02 11:39:02 -0800 | [diff] [blame] | 151 | ], |
Kenny Root | 923342a | 2016-09-22 17:04:35 -0700 | [diff] [blame] | 152 | defaults: ["conscrypt_global"], |
| 153 | |
| 154 | cflags: [ |
| 155 | "-DCONSCRYPT_OPENJDK", |
| 156 | ], |
| 157 | |
Kenny Root | 923342a | 2016-09-22 17:04:35 -0700 | [diff] [blame] | 158 | local_include_dirs: [ |
nmittler | 7782d13 | 2016-11-22 11:34:01 -0800 | [diff] [blame] | 159 | "common/src/jni/unbundled/include", |
Kenny Root | 923342a | 2016-09-22 17:04:35 -0700 | [diff] [blame] | 160 | ], |
| 161 | |
Kenny Root | 923342a | 2016-09-22 17:04:35 -0700 | [diff] [blame] | 162 | static_libs: [ |
Adam Vartanian | 9b0c017 | 2017-08-16 16:44:17 +0100 | [diff] [blame] | 163 | "libssl", |
Colin Cross | 1b4bbbf | 2019-09-18 11:05:41 -0700 | [diff] [blame] | 164 | "libcrypto_static", |
Kenny Root | 923342a | 2016-09-22 17:04:35 -0700 | [diff] [blame] | 165 | ], |
| 166 | |
| 167 | // TODO: b/26097626. ASAN breaks use of this library in JVM. |
| 168 | // Re-enable sanitization when the issue with making clients of this library |
| 169 | // preload ASAN runtime is resolved. Without that, clients are getting runtime |
| 170 | // errors due to unresolved ASAN symbols, such as |
| 171 | // __asan_option_detect_stack_use_after_return. |
| 172 | sanitize: { |
| 173 | never: true, |
| 174 | }, |
| 175 | |
Kenny Root | 7bf42db | 2016-10-05 10:01:40 -0700 | [diff] [blame] | 176 | stl: "libc++_static", |
Dan Willemsen | c9d6d8f | 2019-01-04 16:13:27 -0800 | [diff] [blame] | 177 | |
| 178 | // The post-build signing tools need signapk.jar and its shared libs |
| 179 | multilib: { |
| 180 | lib64: { |
| 181 | dist: { |
| 182 | targets: ["droidcore"], |
| 183 | }, |
| 184 | }, |
| 185 | }, |
Kenny Root | 923342a | 2016-09-22 17:04:35 -0700 | [diff] [blame] | 186 | } |
Colin Cross | 8024b11 | 2017-10-09 13:34:58 -0700 | [diff] [blame] | 187 | |
| 188 | cc_binary_host { |
| 189 | name: "conscrypt_generate_constants", |
| 190 | srcs: ["constants/src/gen/cpp/generate_constants.cc"], |
Chih-Hung Hsieh | 7a28614 | 2017-10-25 16:07:06 -0700 | [diff] [blame] | 191 | cflags: [ |
| 192 | "-Wall", |
| 193 | "-Werror", |
| 194 | ], |
Colin Cross | 8024b11 | 2017-10-09 13:34:58 -0700 | [diff] [blame] | 195 | shared_libs: [ |
| 196 | "libcrypto", |
| 197 | "libssl", |
| 198 | ], |
| 199 | } |
| 200 | |
| 201 | genrule { |
Paul Duffin | 38fb801 | 2019-09-20 15:55:58 +0100 | [diff] [blame] | 202 | name: "conscrypt-unbundled_generated_constants", |
Colin Cross | 8024b11 | 2017-10-09 13:34:58 -0700 | [diff] [blame] | 203 | out: ["org/conscrypt/NativeConstants.java"], |
| 204 | cmd: "$(location conscrypt_generate_constants) > $(out)", |
| 205 | tools: ["conscrypt_generate_constants"], |
| 206 | } |
| 207 | |
Paul Duffin | 31d1d15 | 2018-09-19 15:03:21 +0100 | [diff] [blame] | 208 | genrule { |
| 209 | name: "conscrypt_generated_constants", |
| 210 | out: ["com/android/org/conscrypt/NativeConstants.java"], |
| 211 | cmd: "$(location conscrypt_generate_constants) com.android.org.conscrypt > $(out)", |
| 212 | tools: ["conscrypt_generate_constants"], |
| 213 | } |
| 214 | |
Neil Fuller | 3bf29f2 | 2018-09-24 17:35:33 +0100 | [diff] [blame] | 215 | filegroup { |
| 216 | name: "conscrypt_java_files", |
| 217 | srcs: [ |
| 218 | "repackaged/common/src/main/java/**/*.java", |
| 219 | "repackaged/platform/src/main/java/**/*.java", |
| 220 | ":conscrypt_generated_constants", |
| 221 | ], |
| 222 | } |
| 223 | |
Adam Vartanian | acc0e55 | 2018-10-18 10:09:22 +0100 | [diff] [blame] | 224 | filegroup { |
| 225 | name: "conscrypt_public_api_files", |
Paul Duffin | c2e15cd | 2019-03-28 14:26:40 +0000 | [diff] [blame] | 226 | srcs: ["publicapi/src/main/java/**/*.java"], |
Jiyong Park | 956d12f | 2019-09-13 20:47:19 +0900 | [diff] [blame] | 227 | path: "publicapi/src/main/java", |
Adam Vartanian | acc0e55 | 2018-10-18 10:09:22 +0100 | [diff] [blame] | 228 | } |
| 229 | |
Paul Duffin | 31d1d15 | 2018-09-19 15:03:21 +0100 | [diff] [blame] | 230 | // Create the conscrypt library from the source produced by the srcgen/generate_android_src.sh |
| 231 | // script. |
Colin Cross | 8024b11 | 2017-10-09 13:34:58 -0700 | [diff] [blame] | 232 | java_library { |
| 233 | name: "conscrypt", |
Paul Duffin | c2e15cd | 2019-03-28 14:26:40 +0000 | [diff] [blame] | 234 | visibility: [ |
Paul Duffin | a3891b0 | 2019-06-04 12:50:59 +0100 | [diff] [blame] | 235 | "//device:__subpackages__", |
Paul Duffin | c2e15cd | 2019-03-28 14:26:40 +0000 | [diff] [blame] | 236 | "//system/apex/tests", |
| 237 | ":__subpackages__", |
| 238 | ], |
Jiyong Park | 59e066f | 2019-12-02 13:58:22 +0900 | [diff] [blame] | 239 | apex_available: [ |
| 240 | "com.android.conscrypt", |
| 241 | "test_com.android.conscrypt", |
| 242 | ], |
Jooyung Han | 8272475 | 2020-04-27 17:41:26 +0900 | [diff] [blame] | 243 | // Conscrypt should support Q |
| 244 | min_sdk_version: "29", |
| 245 | |
Colin Cross | 291db15 | 2018-06-27 11:00:08 -0700 | [diff] [blame] | 246 | installable: true, |
Nicolas Geoffray | 5e442fd | 2020-03-31 14:03:19 +0100 | [diff] [blame] | 247 | // Hostdex is only for ART testing on host: ART build file has its |
| 248 | // own hostdex support for conscrypt. |
| 249 | hostdex: false, |
Neil Fuller | a179d2b | 2018-09-11 18:43:08 +0100 | [diff] [blame] | 250 | |
Adam Vartanian | acc0e55 | 2018-10-18 10:09:22 +0100 | [diff] [blame] | 251 | srcs: [ |
| 252 | ":conscrypt_java_files", |
| 253 | ":conscrypt_public_api_files", |
| 254 | ], |
Neil Fuller | a179d2b | 2018-09-11 18:43:08 +0100 | [diff] [blame] | 255 | |
Martin Stjernholm | 5b62126 | 2020-11-05 14:28:21 +0000 | [diff] [blame] | 256 | libs: ["unsupportedappusage"], |
Artur Satayev | 1c25829 | 2019-12-10 12:08:51 +0000 | [diff] [blame] | 257 | |
Neil Fuller | 2f11772 | 2018-09-26 16:14:23 +0100 | [diff] [blame] | 258 | // Conscrypt can be updated independently from the other core libraries so it must only depend |
| 259 | // on public SDK and intra-core APIs. |
Paul Duffin | 1f66bef | 2019-06-12 11:04:35 +0100 | [diff] [blame] | 260 | sdk_version: "none", |
Paul Duffin | 8e719de | 2019-10-02 12:19:33 +0100 | [diff] [blame] | 261 | system_modules: "art-module-intra-core-api-stubs-system-modules", |
Paul Duffin | 9cc4359 | 2019-09-20 14:37:14 +0100 | [diff] [blame] | 262 | patch_module: "java.base", |
Neil Fuller | a179d2b | 2018-09-11 18:43:08 +0100 | [diff] [blame] | 263 | |
Pete Bentley | e58b81d | 2019-04-15 17:48:45 +0100 | [diff] [blame] | 264 | target: { |
Tobias Thierer | 5234459 | 2019-09-02 17:32:02 +0100 | [diff] [blame] | 265 | // boringssl_self_test needed in both /system/bin and /apex/com.android.conscrypt/bin |
Pete Bentley | 29349d9 | 2022-09-20 16:33:21 +0100 | [diff] [blame] | 266 | // prng_seeder is only needed in /system/bin |
| 267 | // The required directive is here rather than under boringssl to avoid circular |
| 268 | // dependencies. |
Tobias Thierer | 5234459 | 2019-09-02 17:32:02 +0100 | [diff] [blame] | 269 | android: { |
Pete Bentley | 29349d9 | 2022-09-20 16:33:21 +0100 | [diff] [blame] | 270 | required: [ |
| 271 | "boringssl_self_test", |
| 272 | "prng_seeder", |
| 273 | ], |
Tobias Thierer | 5234459 | 2019-09-02 17:32:02 +0100 | [diff] [blame] | 274 | }, |
Pete Bentley | e58b81d | 2019-04-15 17:48:45 +0100 | [diff] [blame] | 275 | }, |
| 276 | |
Vladimir Marko | f68e509 | 2019-04-02 10:28:43 +0100 | [diff] [blame] | 277 | permitted_packages: [ |
| 278 | "android.net.ssl", |
| 279 | "com.android.org.conscrypt", |
| 280 | ], |
Kun Niu | 7fd0a4b | 2019-07-02 10:16:55 -0700 | [diff] [blame] | 281 | |
| 282 | plugins: ["java_api_finder"], |
Colin Cross | 8024b11 | 2017-10-09 13:34:58 -0700 | [diff] [blame] | 283 | } |
| 284 | |
Paul Duffin | 6e8a57c | 2021-04-19 18:00:55 +0100 | [diff] [blame] | 285 | // Java library for use on host, e.g. by robolectric. |
| 286 | java_library { |
| 287 | name: "conscrypt-for-host", |
| 288 | visibility: [ |
| 289 | "//art/build", |
| 290 | "//external/robolectric-shadows", |
Rex Hoffman | 346bf70 | 2022-11-13 22:55:07 +0000 | [diff] [blame] | 291 | "//external/robolectric", |
Jerome Gaillard | 19a264e | 2021-09-22 17:31:04 +0000 | [diff] [blame] | 292 | "//frameworks/layoutlib", |
Paul Duffin | 6e8a57c | 2021-04-19 18:00:55 +0100 | [diff] [blame] | 293 | ], |
| 294 | static_libs: [ |
| 295 | "conscrypt", |
| 296 | ], |
| 297 | sdk_version: "none", |
| 298 | system_modules: "none", |
| 299 | } |
| 300 | |
Paul Duffin | 7d1915d | 2019-12-24 09:22:30 +0000 | [diff] [blame] | 301 | // Referenced implicitly from conscrypt.module.platform.api. |
| 302 | filegroup { |
| 303 | name: "conscrypt.module.platform.api.api.public.latest", |
Paul Duffin | be619e8 | 2019-10-03 13:50:13 +0100 | [diff] [blame] | 304 | srcs: [ |
Paul Duffin | 7d1915d | 2019-12-24 09:22:30 +0000 | [diff] [blame] | 305 | "api/platform/last-api.txt", |
Paul Duffin | be619e8 | 2019-10-03 13:50:13 +0100 | [diff] [blame] | 306 | ], |
Paul Duffin | 7d1915d | 2019-12-24 09:22:30 +0000 | [diff] [blame] | 307 | } |
Paul Duffin | be619e8 | 2019-10-03 13:50:13 +0100 | [diff] [blame] | 308 | |
Paul Duffin | 7d1915d | 2019-12-24 09:22:30 +0000 | [diff] [blame] | 309 | // Referenced implicitly from conscrypt.module.platform.api. |
| 310 | filegroup { |
| 311 | name: "conscrypt.module.platform.api-removed.api.public.latest", |
| 312 | srcs: [ |
| 313 | "api/platform/last-removed.txt", |
| 314 | ], |
Paul Duffin | be619e8 | 2019-10-03 13:50:13 +0100 | [diff] [blame] | 315 | } |
| 316 | |
Jaewoong Jung | 696de95 | 2021-03-09 16:08:39 -0800 | [diff] [blame] | 317 | // Referenced implicitly from conscrypt.module.platform.api. |
| 318 | filegroup { |
| 319 | name: "conscrypt.module.platform.api-incompatibilities.api.public.latest", |
| 320 | srcs: [ |
| 321 | "api/platform/last-incompatibilities.txt", |
| 322 | ], |
| 323 | } |
| 324 | |
Paul Duffin | be619e8 | 2019-10-03 13:50:13 +0100 | [diff] [blame] | 325 | // A library containing the core platform API stubs of the Conscrypt module. |
| 326 | // |
| 327 | // Core platform APIs are only intended for use of other parts of the platform, not the |
| 328 | // core library modules. |
Paul Duffin | 7d1915d | 2019-12-24 09:22:30 +0000 | [diff] [blame] | 329 | // |
| 330 | // The API specification .txt files managed by this only contain the additional |
| 331 | // classes/members that are in the platform API but which are not in the public |
| 332 | // API. |
Pete Gillin | 4efd91f | 2020-06-12 12:28:59 +0100 | [diff] [blame] | 333 | // |
| 334 | // Note that this entire API surface is considered stable in the sense described in |
| 335 | // libcore/mmodules/core_platform_api/Android.bp. |
Paul Duffin | 7d1915d | 2019-12-24 09:22:30 +0000 | [diff] [blame] | 336 | java_sdk_library { |
| 337 | name: "conscrypt.module.platform.api", |
Paul Duffin | be619e8 | 2019-10-03 13:50:13 +0100 | [diff] [blame] | 338 | visibility: [ |
Paul Duffin | df7df8e | 2021-07-10 23:33:28 +0100 | [diff] [blame] | 339 | "//build/soong/java/core-libraries", |
Paul Duffin | a938a16 | 2019-10-04 15:34:31 +0100 | [diff] [blame] | 340 | "//external/wycheproof", |
Martin Stjernholm | 25d6192 | 2020-05-07 02:01:09 +0100 | [diff] [blame] | 341 | // Visibility for prebuilt conscrypt-module-sdk from the prebuilt of |
| 342 | // this module. |
| 343 | // TODO(b/155921753): Restrict this when prebuilts are in their proper |
| 344 | // locations. |
| 345 | "//prebuilts:__subpackages__", |
Paul Duffin | d935af2 | 2022-07-15 16:15:24 +0000 | [diff] [blame] | 346 | |
| 347 | // DO NOT REMOVE: Legacy visibility, needed for snapshots that are |
| 348 | // generated for the S build. |
| 349 | "//libcore/mmodules/core_platform_api", |
Paul Duffin | be619e8 | 2019-10-03 13:50:13 +0100 | [diff] [blame] | 350 | ], |
| 351 | srcs: [ |
Paul Duffin | 7d1915d | 2019-12-24 09:22:30 +0000 | [diff] [blame] | 352 | ":conscrypt_java_files", |
| 353 | ], |
| 354 | api_dir: "api/platform", |
| 355 | api_only: true, |
Paul Duffin | 0b65d01 | 2020-11-20 11:45:23 +0000 | [diff] [blame] | 356 | api_lint: { |
| 357 | enabled: true, |
| 358 | }, |
Paul Duffin | 7d1915d | 2019-12-24 09:22:30 +0000 | [diff] [blame] | 359 | droiddoc_options: [ |
| 360 | "--hide-annotation libcore.api.Hide", |
Pete Gillin | 4efd91f | 2020-06-12 12:28:59 +0100 | [diff] [blame] | 361 | "--show-single-annotation libcore.api.CorePlatformApi\\(status=libcore.api.CorePlatformApi.Status.STABLE\\)", |
Paul Duffin | be619e8 | 2019-10-03 13:50:13 +0100 | [diff] [blame] | 362 | ], |
| 363 | hostdex: true, |
| 364 | |
| 365 | sdk_version: "none", |
Victor Chang | c8c8907 | 2021-06-30 22:02:26 +0100 | [diff] [blame] | 366 | system_modules: "art-module-lib-api-stubs-system-modules", |
Paul Duffin | f915855 | 2020-11-19 19:26:08 +0000 | [diff] [blame] | 367 | |
Anton Hansson | dea8f0b | 2021-06-04 19:13:01 +0100 | [diff] [blame] | 368 | dist_group: "android", |
| 369 | dist_stem: "conscrypt-coreplatform", |
| 370 | // TODO: remove this when Conscrypt's @CorePlatformApi has been migrated to @SystemApi |
| 371 | unsafe_ignore_missing_latest_api: true, |
Paul Duffin | be619e8 | 2019-10-03 13:50:13 +0100 | [diff] [blame] | 372 | } |
| 373 | |
Paul Duffin | 68a5316 | 2020-04-08 23:59:02 +0100 | [diff] [blame] | 374 | // A library containing the public API stubs of the Conscrypt module. |
| 375 | java_sdk_library { |
| 376 | name: "conscrypt.module.public.api", |
Paul Duffin | 6fa05ed | 2019-10-03 16:01:06 +0100 | [diff] [blame] | 377 | visibility: [ |
Paul Duffin | df7df8e | 2021-07-10 23:33:28 +0100 | [diff] [blame] | 378 | "//build/soong/java/core-libraries", |
Paul Duffin | 5b5f8bf | 2020-03-26 15:35:44 +0000 | [diff] [blame] | 379 | "//frameworks/base", |
Anton Hansson | ad10dff | 2020-09-21 17:24:46 +0100 | [diff] [blame] | 380 | "//frameworks/base/api", |
Paul Duffin | df7df8e | 2021-07-10 23:33:28 +0100 | [diff] [blame] | 381 | "//packages/modules/common/sdk", |
Rayan Osseiran | 29b30d4 | 2020-08-26 18:08:06 +0000 | [diff] [blame] | 382 | // TODO(b/165823103): Remove visiblity for IPsec once CorePlatformApi is available |
| 383 | "//packages/modules/IPsec", |
Martin Stjernholm | 25d6192 | 2020-05-07 02:01:09 +0100 | [diff] [blame] | 384 | // Visibility for prebuilt art-module-host-exports from the prebuilt of |
| 385 | // this module. |
| 386 | // TODO(b/155921753): Restrict this when prebuilts are in their proper |
| 387 | // locations. |
| 388 | "//prebuilts:__subpackages__", |
Paul Duffin | d935af2 | 2022-07-15 16:15:24 +0000 | [diff] [blame] | 389 | |
| 390 | // DO NOT REMOVE: Legacy visibility, needed for snapshots that are |
| 391 | // generated for the S build. |
| 392 | "//libcore", |
Paul Duffin | 6fa05ed | 2019-10-03 16:01:06 +0100 | [diff] [blame] | 393 | ], |
Paul Duffin | 0f6ed70 | 2019-09-27 14:55:06 +0100 | [diff] [blame] | 394 | srcs: [ |
| 395 | ":conscrypt_public_api_files", |
| 396 | ], |
Paul Duffin | 8c78a8d | 2020-11-20 22:34:12 +0000 | [diff] [blame] | 397 | |
| 398 | // The base name for the artifacts that are automatically published to the |
| 399 | // dist and which end up in one of the sub-directories of prebuilts/sdk. |
| 400 | // As long as this matches the name of the artifacts in prebuilts/sdk then |
| 401 | // the API will be checked for compatibility against the latest released |
| 402 | // version of the API. |
| 403 | dist_stem: "conscrypt", |
| 404 | |
Paul Duffin | 368dace | 2022-01-25 15:52:38 +0000 | [diff] [blame] | 405 | public: { |
| 406 | enabled: true, |
| 407 | }, |
| 408 | system: { |
| 409 | enabled: true, |
| 410 | }, |
| 411 | module_lib: { |
| 412 | enabled: true, |
| 413 | }, |
| 414 | |
Paul Duffin | 68a5316 | 2020-04-08 23:59:02 +0100 | [diff] [blame] | 415 | api_dir: "api/public", |
| 416 | api_only: true, |
Paul Duffin | eb15336 | 2022-01-25 15:52:01 +0000 | [diff] [blame] | 417 | |
| 418 | // Emit nullability annotations from the source to the stub files. |
| 419 | annotations_enabled: true, |
Paul Duffin | 68a5316 | 2020-04-08 23:59:02 +0100 | [diff] [blame] | 420 | |
| 421 | java_version: "1.9", |
| 422 | |
Paul Duffin | 0f6ed70 | 2019-09-27 14:55:06 +0100 | [diff] [blame] | 423 | sdk_version: "none", |
| 424 | system_modules: "art-module-public-api-stubs-system-modules", |
Colin Cross | e34107b | 2021-05-10 10:47:44 -0700 | [diff] [blame] | 425 | dist_group: "android", |
Paul Duffin | 0f6ed70 | 2019-09-27 14:55:06 +0100 | [diff] [blame] | 426 | } |
| 427 | |
Paul Duffin | 067f1c0 | 2019-12-24 20:59:54 +0000 | [diff] [blame] | 428 | // Referenced implicitly from conscrypt.module.intra.core.api. |
| 429 | filegroup { |
| 430 | name: "conscrypt.module.intra.core.api.api.public.latest", |
Paul Duffin | 70fd037 | 2019-10-02 11:07:56 +0100 | [diff] [blame] | 431 | srcs: [ |
Paul Duffin | 067f1c0 | 2019-12-24 20:59:54 +0000 | [diff] [blame] | 432 | "api/intra/last-api.txt", |
Paul Duffin | 70fd037 | 2019-10-02 11:07:56 +0100 | [diff] [blame] | 433 | ], |
Paul Duffin | 067f1c0 | 2019-12-24 20:59:54 +0000 | [diff] [blame] | 434 | } |
Paul Duffin | 70fd037 | 2019-10-02 11:07:56 +0100 | [diff] [blame] | 435 | |
Paul Duffin | 067f1c0 | 2019-12-24 20:59:54 +0000 | [diff] [blame] | 436 | // Referenced implicitly from conscrypt.module.intra.core.api. |
| 437 | filegroup { |
| 438 | name: "conscrypt.module.intra.core.api-removed.api.public.latest", |
| 439 | srcs: [ |
| 440 | "api/intra/last-removed.txt", |
| 441 | ], |
Paul Duffin | 70fd037 | 2019-10-02 11:07:56 +0100 | [diff] [blame] | 442 | } |
| 443 | |
Jaewoong Jung | 696de95 | 2021-03-09 16:08:39 -0800 | [diff] [blame] | 444 | // Referenced implicitly from conscrypt.module.intra.core.api. |
| 445 | filegroup { |
| 446 | name: "conscrypt.module.intra.core.api-incompatibilities.api.public.latest", |
| 447 | srcs: [ |
| 448 | "api/intra/last-incompatibilities.txt", |
| 449 | ], |
| 450 | } |
| 451 | |
Paul Duffin | 70fd037 | 2019-10-02 11:07:56 +0100 | [diff] [blame] | 452 | // A library containing the intra-core API stubs of the Conscrypt module. |
| 453 | // |
| 454 | // Intra-core APIs are only intended for the use of other core library modules. |
Paul Duffin | 067f1c0 | 2019-12-24 20:59:54 +0000 | [diff] [blame] | 455 | // |
| 456 | // The API specification .txt files managed by this only contain the additional |
| 457 | // classes/members that are in the intra-core API but which are not the public API. |
| 458 | java_sdk_library { |
| 459 | name: "conscrypt.module.intra.core.api", |
Paul Duffin | 70fd037 | 2019-10-02 11:07:56 +0100 | [diff] [blame] | 460 | visibility: [ |
Paul Duffin | 30fbc05 | 2019-10-02 14:01:49 +0100 | [diff] [blame] | 461 | "//external/okhttp", |
Paul Duffin | 70fd037 | 2019-10-02 11:07:56 +0100 | [diff] [blame] | 462 | "//libcore:__subpackages__", |
Martin Stjernholm | 25d6192 | 2020-05-07 02:01:09 +0100 | [diff] [blame] | 463 | // Visibility for prebuilt conscrypt-module-sdk from the prebuilt of |
| 464 | // this module. |
| 465 | // TODO(b/155921753): Restrict this when prebuilts are in their proper |
| 466 | // locations. |
| 467 | "//prebuilts:__subpackages__", |
Paul Duffin | 70fd037 | 2019-10-02 11:07:56 +0100 | [diff] [blame] | 468 | ], |
| 469 | srcs: [ |
Paul Duffin | 067f1c0 | 2019-12-24 20:59:54 +0000 | [diff] [blame] | 470 | ":conscrypt_java_files", |
| 471 | ":conscrypt_public_api_files", |
| 472 | ], |
| 473 | api_dir: "api/intra", |
| 474 | api_only: true, |
| 475 | droiddoc_options: [ |
| 476 | "--hide-annotation libcore.api.Hide", |
| 477 | "--show-single-annotation libcore.api.IntraCoreApi", |
Paul Duffin | 70fd037 | 2019-10-02 11:07:56 +0100 | [diff] [blame] | 478 | ], |
| 479 | |
| 480 | sdk_version: "none", |
| 481 | system_modules: "art-module-intra-core-api-stubs-system-modules", |
Paul Duffin | f915855 | 2020-11-19 19:26:08 +0000 | [diff] [blame] | 482 | |
| 483 | // Don't copy any output files to the dist. |
| 484 | no_dist: true, |
Paul Duffin | 70fd037 | 2019-10-02 11:07:56 +0100 | [diff] [blame] | 485 | } |
| 486 | |
Colin Cross | 8024b11 | 2017-10-09 13:34:58 -0700 | [diff] [blame] | 487 | // Platform conscrypt crypto JNI library |
| 488 | cc_defaults { |
| 489 | name: "libjavacrypto-defaults", |
| 490 | |
| 491 | cflags: [ |
| 492 | "-Wall", |
| 493 | "-Wextra", |
| 494 | "-Werror", |
| 495 | "-Wunused", |
| 496 | "-fvisibility=hidden", |
| 497 | ], |
| 498 | |
| 499 | srcs: ["common/src/jni/main/cpp/**/*.cc"], |
Orion Hodson | 7631f2c | 2020-04-11 18:30:14 +0100 | [diff] [blame] | 500 | header_libs: ["jni_headers"], |
Colin Cross | 8024b11 | 2017-10-09 13:34:58 -0700 | [diff] [blame] | 501 | local_include_dirs: ["common/src/jni/main/include"], |
| 502 | } |
| 503 | |
| 504 | // Platform conscrypt crypto JNI library |
| 505 | cc_library_shared { |
| 506 | name: "libjavacrypto", |
| 507 | host_supported: true, |
| 508 | defaults: ["libjavacrypto-defaults"], |
| 509 | |
| 510 | cflags: ["-DJNI_JARJAR_PREFIX=com/android/"], |
Orion Hodson | b5e43bd | 2019-01-27 10:57:34 +0000 | [diff] [blame] | 511 | header_libs: ["libnativehelper_header_only"], |
Colin Cross | 8024b11 | 2017-10-09 13:34:58 -0700 | [diff] [blame] | 512 | shared_libs: [ |
| 513 | "libcrypto", |
Colin Cross | 8024b11 | 2017-10-09 13:34:58 -0700 | [diff] [blame] | 514 | "liblog", |
Colin Cross | 8024b11 | 2017-10-09 13:34:58 -0700 | [diff] [blame] | 515 | "libssl", |
| 516 | ], |
| 517 | |
| 518 | target: { |
| 519 | darwin: { |
| 520 | enabled: false, |
| 521 | }, |
Colin Cross | 17b0d18 | 2020-02-19 17:04:44 -0800 | [diff] [blame] | 522 | android: { |
| 523 | runtime_libs: ["libandroidio"], |
| 524 | }, |
| 525 | not_windows: { |
| 526 | runtime_libs: ["libandroidio"], |
| 527 | }, |
Colin Cross | 8024b11 | 2017-10-09 13:34:58 -0700 | [diff] [blame] | 528 | }, |
Jiyong Park | 59e066f | 2019-12-02 13:58:22 +0900 | [diff] [blame] | 529 | apex_available: [ |
| 530 | "com.android.conscrypt", |
| 531 | "test_com.android.conscrypt", |
| 532 | ], |
Jooyung Han | 4394530 | 2020-04-16 18:48:26 +0900 | [diff] [blame] | 533 | min_sdk_version: "29", |
Colin Cross | 8024b11 | 2017-10-09 13:34:58 -0700 | [diff] [blame] | 534 | } |
| 535 | |
Michael Groover | 68c477b | 2020-07-16 20:32:13 -0700 | [diff] [blame] | 536 | // Unbundled Conscrypt jar for use by signapk and apksigner tool |
Paul Duffin | 38fb801 | 2019-09-20 15:55:58 +0100 | [diff] [blame] | 537 | // |
| 538 | // Builds against standard host libraries. |
| 539 | java_library_host { |
| 540 | name: "conscrypt-unbundled", |
| 541 | visibility: [ |
| 542 | "//build/make/tools/signapk", |
Nicolas Geoffray | ffd7356 | 2020-07-29 13:54:40 +0100 | [diff] [blame] | 543 | "//tools/apksig", |
Rex Hoffman | 346bf70 | 2022-11-13 22:55:07 +0000 | [diff] [blame] | 544 | "//external/robolectric/robolectric", |
Rex Hoffman | db4a1de | 2022-11-13 23:01:18 +0000 | [diff] [blame] | 545 | "//external/robolectric:__subpackages__", |
Paul Duffin | 38fb801 | 2019-09-20 15:55:58 +0100 | [diff] [blame] | 546 | ], |
Colin Cross | 8024b11 | 2017-10-09 13:34:58 -0700 | [diff] [blame] | 547 | srcs: [ |
| 548 | "common/src/main/java/**/*.java", |
Paul Duffin | 38fb801 | 2019-09-20 15:55:58 +0100 | [diff] [blame] | 549 | "openjdk/src/main/java/**/*.java", |
| 550 | ":conscrypt-unbundled_generated_constants", |
Colin Cross | 8024b11 | 2017-10-09 13:34:58 -0700 | [diff] [blame] | 551 | ], |
Paul Duffin | 38fb801 | 2019-09-20 15:55:58 +0100 | [diff] [blame] | 552 | javacflags: ["-XDignore.symbol.file"], |
Pete Bentley | f81aacc | 2021-07-27 08:33:01 +0000 | [diff] [blame] | 553 | java_version: "1.8", |
Dan Willemsen | 6e404a3 | 2021-09-20 23:23:13 -0700 | [diff] [blame] | 554 | target: { |
| 555 | windows: { |
| 556 | enabled: true, |
| 557 | }, |
| 558 | }, |
Colin Cross | 8024b11 | 2017-10-09 13:34:58 -0700 | [diff] [blame] | 559 | } |
| 560 | |
| 561 | // Static unbundled Conscrypt crypto JNI library |
| 562 | cc_library_static { |
| 563 | name: "libconscrypt_static", |
| 564 | defaults: ["libjavacrypto-defaults"], |
| 565 | |
| 566 | cflags: [ |
| 567 | "-DJNI_JARJAR_PREFIX=com/google/android/gms/", |
| 568 | "-DCONSCRYPT_UNBUNDLED", |
| 569 | "-DSTATIC_LIB", |
| 570 | ], |
| 571 | |
| 572 | local_include_dirs: ["common/src/jni/unbundled/include"], |
| 573 | |
| 574 | static_libs: [ |
| 575 | "libssl", |
Colin Cross | 1b4bbbf | 2019-09-18 11:05:41 -0700 | [diff] [blame] | 576 | "libcrypto_static", |
Colin Cross | 8024b11 | 2017-10-09 13:34:58 -0700 | [diff] [blame] | 577 | ], |
| 578 | sdk_version: "9", |
| 579 | stl: "c++_shared", |
| 580 | } |
Colin Cross | f569ee3 | 2018-09-11 22:38:08 -0700 | [diff] [blame] | 581 | |
Colin Cross | f569ee3 | 2018-09-11 22:38:08 -0700 | [diff] [blame] | 582 | // Make the conscrypt-tests library. |
| 583 | java_test { |
| 584 | name: "conscrypt-tests", |
Paul Duffin | a3891b0 | 2019-06-04 12:50:59 +0100 | [diff] [blame] | 585 | visibility: [ |
| 586 | "//cts/tests/libcore/luni", |
Daulet Zhanguzin | aa10cf7 | 2020-01-23 13:51:51 +0000 | [diff] [blame] | 587 | "//external/conscrypt/apex/tests", |
Paul Duffin | a3891b0 | 2019-06-04 12:50:59 +0100 | [diff] [blame] | 588 | ], |
Colin Cross | f569ee3 | 2018-09-11 22:38:08 -0700 | [diff] [blame] | 589 | hostdex: true, |
| 590 | srcs: [ |
Paul Duffin | 31d1d15 | 2018-09-19 15:03:21 +0100 | [diff] [blame] | 591 | "repackaged/platform/src/test/java/**/*.java", |
| 592 | "repackaged/common/src/test/java/**/*.java", |
Paul Duffin | 31d1d15 | 2018-09-19 15:03:21 +0100 | [diff] [blame] | 593 | "repackaged/testing/src/main/java/**/*.java", |
Adam Vartanian | acc0e55 | 2018-10-18 10:09:22 +0100 | [diff] [blame] | 594 | "publicapi/src/test/java/**/*.java", |
Colin Cross | f569ee3 | 2018-09-11 22:38:08 -0700 | [diff] [blame] | 595 | ], |
| 596 | java_resource_dirs: [ |
Paul Duffin | 31d1d15 | 2018-09-19 15:03:21 +0100 | [diff] [blame] | 597 | // Resource directories do not need repackaging. |
Colin Cross | f569ee3 | 2018-09-11 22:38:08 -0700 | [diff] [blame] | 598 | "openjdk/src/test/resources", |
Pete Bentley | 3914ba7 | 2019-09-27 11:57:50 +0100 | [diff] [blame] | 599 | "common/src/test/resources", |
Colin Cross | f569ee3 | 2018-09-11 22:38:08 -0700 | [diff] [blame] | 600 | ], |
Neil Fuller | 27e690d | 2018-10-10 12:58:01 +0100 | [diff] [blame] | 601 | |
Paul Duffin | 1f66bef | 2019-06-12 11:04:35 +0100 | [diff] [blame] | 602 | sdk_version: "none", |
Paul Duffin | 8e719de | 2019-10-02 12:19:33 +0100 | [diff] [blame] | 603 | system_modules: "art-module-intra-core-api-stubs-system-modules", |
Colin Cross | f569ee3 | 2018-09-11 22:38:08 -0700 | [diff] [blame] | 604 | libs: [ |
Neil Fuller | 719e00f | 2018-10-19 09:32:43 +0100 | [diff] [blame] | 605 | "conscrypt", |
Paul Duffin | 880d542 | 2019-09-24 16:22:04 +0100 | [diff] [blame] | 606 | "core-test-rules", |
Colin Cross | f569ee3 | 2018-09-11 22:38:08 -0700 | [diff] [blame] | 607 | "junit", |
| 608 | "mockito-target-minus-junit4", |
Pete Bentley | 506e6f6 | 2020-12-07 13:45:14 +0000 | [diff] [blame] | 609 | "framework-statsd.stubs.module_lib", |
Colin Cross | f569ee3 | 2018-09-11 22:38:08 -0700 | [diff] [blame] | 610 | ], |
Neil Fuller | 27e690d | 2018-10-10 12:58:01 +0100 | [diff] [blame] | 611 | |
Colin Cross | f569ee3 | 2018-09-11 22:38:08 -0700 | [diff] [blame] | 612 | static_libs: [ |
Colin Cross | f569ee3 | 2018-09-11 22:38:08 -0700 | [diff] [blame] | 613 | "bouncycastle-unbundled", |
| 614 | "bouncycastle-bcpkix-unbundled", |
| 615 | "bouncycastle-ocsp-unbundled", |
| 616 | ], |
| 617 | javacflags: [ |
| 618 | "-Xmaxwarns 9999999", |
| 619 | //"-Xlint:all", |
| 620 | //"-Xlint:-serial,-deprecation,-unchecked", |
| 621 | ], |
| 622 | |
Yo Chiang | 8e450f0 | 2020-08-07 04:22:18 +0000 | [diff] [blame] | 623 | target: { |
| 624 | host: { |
| 625 | required: ["libjavacrypto"], |
| 626 | }, |
| 627 | darwin: { |
| 628 | // required module "libjavacrypto" is disabled on darwin |
| 629 | enabled: false, |
| 630 | }, |
| 631 | }, |
Pete Bentley | 58c7f7d | 2022-03-31 16:47:25 +0100 | [diff] [blame] | 632 | java_version: "1.8", |
Colin Cross | f569ee3 | 2018-09-11 22:38:08 -0700 | [diff] [blame] | 633 | } |
| 634 | |
| 635 | // Make the conscrypt-benchmarks library. |
| 636 | java_test { |
| 637 | name: "conscrypt-benchmarks", |
| 638 | srcs: [ |
Paul Duffin | 31d1d15 | 2018-09-19 15:03:21 +0100 | [diff] [blame] | 639 | "repackaged/testing/src/main/java/**/*.java", |
| 640 | "repackaged/benchmark-base/src/main/java/**/*.java", |
| 641 | "repackaged/benchmark-android/src/main/java/**/*.java", |
Colin Cross | f569ee3 | 2018-09-11 22:38:08 -0700 | [diff] [blame] | 642 | ], |
Paul Duffin | 1f66bef | 2019-06-12 11:04:35 +0100 | [diff] [blame] | 643 | sdk_version: "none", |
Paul Duffin | 8e719de | 2019-10-02 12:19:33 +0100 | [diff] [blame] | 644 | system_modules: "art-module-intra-core-api-stubs-system-modules", |
Colin Cross | f569ee3 | 2018-09-11 22:38:08 -0700 | [diff] [blame] | 645 | libs: [ |
Neil Fuller | 719e00f | 2018-10-19 09:32:43 +0100 | [diff] [blame] | 646 | "conscrypt", |
Colin Cross | f569ee3 | 2018-09-11 22:38:08 -0700 | [diff] [blame] | 647 | "junit", |
| 648 | "bouncycastle-unbundled", |
| 649 | "bouncycastle-bcpkix-unbundled", |
| 650 | "bouncycastle-ocsp-unbundled", |
| 651 | "caliper-api-target", |
| 652 | ], |
Neil Fuller | 5d27235 | 2018-10-12 22:10:57 +0100 | [diff] [blame] | 653 | |
Colin Cross | f569ee3 | 2018-09-11 22:38:08 -0700 | [diff] [blame] | 654 | javacflags: [ |
| 655 | "-Xmaxwarns 9999999", |
| 656 | //"-Xlint:all", |
| 657 | //"-Xlint:-serial,-deprecation,-unchecked", |
| 658 | ], |
| 659 | |
Yo Chiang | 8e450f0 | 2020-08-07 04:22:18 +0000 | [diff] [blame] | 660 | target: { |
| 661 | host: { |
| 662 | required: ["libjavacrypto"], |
| 663 | }, |
| 664 | darwin: { |
| 665 | // required module "libjavacrypto" is disabled on darwin |
| 666 | enabled: false, |
| 667 | }, |
| 668 | }, |
Pete Bentley | 58c7f7d | 2022-03-31 16:47:25 +0100 | [diff] [blame] | 669 | java_version: "1.8", |
Colin Cross | f569ee3 | 2018-09-11 22:38:08 -0700 | [diff] [blame] | 670 | } |
Paul Duffin | 403d505 | 2019-11-25 19:56:01 +0000 | [diff] [blame] | 671 | |
| 672 | // Device SDK exposed by the Conscrypt module. |
| 673 | sdk { |
| 674 | name: "conscrypt-module-sdk", |
Paul Duffin | b1919d6 | 2021-05-21 13:15:42 +0100 | [diff] [blame] | 675 | bootclasspath_fragments: [ |
| 676 | "com.android.conscrypt-bootclasspath-fragment", |
Paul Duffin | ec02a05 | 2021-04-19 18:00:55 +0100 | [diff] [blame] | 677 | ], |
Paul Duffin | 8343147 | 2020-04-09 21:44:10 +0100 | [diff] [blame] | 678 | java_sdk_libs: [ |
| 679 | "conscrypt.module.public.api", |
| 680 | "conscrypt.module.intra.core.api", |
| 681 | "conscrypt.module.platform.api", |
Paul Duffin | 403d505 | 2019-11-25 19:56:01 +0000 | [diff] [blame] | 682 | ], |
| 683 | native_shared_libs: [ |
| 684 | "libconscrypt_jni", |
| 685 | ], |
Paul Duffin | 403d505 | 2019-11-25 19:56:01 +0000 | [diff] [blame] | 686 | } |
Paul Duffin | b3fbef3 | 2019-12-09 13:42:13 +0000 | [diff] [blame] | 687 | |
Paul Duffin | 414f523 | 2019-12-16 20:30:20 +0000 | [diff] [blame] | 688 | // Host tools exported by the Conscrypt module. |
| 689 | module_exports { |
| 690 | name: "conscrypt-module-host-exports", |
Paul Duffin | b3fbef3 | 2019-12-09 13:42:13 +0000 | [diff] [blame] | 691 | host_supported: true, |
| 692 | device_supported: false, |
| 693 | java_libs: [ |
| 694 | "conscrypt-unbundled", |
| 695 | ], |
Nicolas Geoffray | 42c2073 | 2020-04-23 15:10:56 +0100 | [diff] [blame] | 696 | native_shared_libs: [ |
| 697 | "libconscrypt_openjdk_jni", |
| 698 | ], |
Paul Duffin | b3fbef3 | 2019-12-09 13:42:13 +0000 | [diff] [blame] | 699 | } |
Paul Duffin | 538cb63 | 2019-12-09 13:41:08 +0000 | [diff] [blame] | 700 | |
| 701 | // Test libraries exposed by the Conscrypt module. |
| 702 | module_exports { |
| 703 | name: "conscrypt-module-test-exports", |
Nicolas Geoffray | e3e93e7 | 2020-04-03 09:05:56 +0000 | [diff] [blame] | 704 | host_supported: true, |
| 705 | target: { |
| 706 | android: { |
| 707 | java_libs: [ |
| 708 | // For use by robolectric and ART tests. |
Paul Duffin | 6e8a57c | 2021-04-19 18:00:55 +0100 | [diff] [blame] | 709 | "conscrypt-for-host", |
Nicolas Geoffray | e3e93e7 | 2020-04-03 09:05:56 +0000 | [diff] [blame] | 710 | ], |
| 711 | java_tests: [ |
| 712 | // For use by CTS |
| 713 | "conscrypt-tests", |
| 714 | ], |
Nicolas Geoffray | 7d5b482 | 2020-04-08 18:09:51 +0100 | [diff] [blame] | 715 | // TODO: Remove this when we resolve b/151303681. |
| 716 | native_shared_libs: [ |
| 717 | "libjavacrypto", |
| 718 | ], |
Nicolas Geoffray | e3e93e7 | 2020-04-03 09:05:56 +0000 | [diff] [blame] | 719 | }, |
| 720 | darwin: { |
| 721 | enabled: false, |
| 722 | }, |
| 723 | // For use by ART tests on host. |
| 724 | not_windows: { |
| 725 | native_shared_libs: [ |
| 726 | "libjavacrypto", |
| 727 | ], |
| 728 | }, |
| 729 | }, |
Paul Duffin | 538cb63 | 2019-12-09 13:41:08 +0000 | [diff] [blame] | 730 | } |