1// This file is generated by cargo2android.py --config cargo2android.json. 2// Do not modify this file as changes will be overridden on upgrade. 3 4package { 5 default_applicable_licenses: ["external_rust_crates_quiche_license"], 6} 7 8// Added automatically by a large-scale-change that took the approach of 9// 'apply every license found to every target'. While this makes sure we respect 10// every license restriction, it may not be entirely correct. 11// 12// e.g. GPL in an MIT project might only apply to the contrib/ directory. 13// 14// Please consider splitting the single license below into multiple licenses, 15// taking care not to lose any license_kind information, and overriding the 16// default license using the 'licenses: [...]' property on targets as needed. 17// 18// For unused files, consider creating a 'fileGroup' with "//visibility:private" 19// to attach the license to, and including a comment whether the files may be 20// used in the current project. 21// See: http://go/android-license-faq 22license { 23 name: "external_rust_crates_quiche_license", 24 visibility: [":__subpackages__"], 25 license_kinds: [ 26 "SPDX-license-identifier-BSD", 27 "SPDX-license-identifier-ISC", 28 "SPDX-license-identifier-OpenSSL", 29 "legacy_unencumbered", 30 ], 31 license_text: [ 32 "COPYING", 33 ], 34} 35 36cc_library_headers { 37 name: "libquiche_ffi_headers", 38 export_include_dirs: ["include"], 39 apex_available: [ 40 "//apex_available:platform", 41 "com.android.resolv", 42 ], 43 min_sdk_version: "29", 44} 45 46rust_defaults { 47 name: "libquiche_defaults", 48 stem: "libquiche", 49 host_supported: true, 50 crate_name: "quiche", 51 cargo_env_compat: true, 52 srcs: ["src/lib.rs"], 53 edition: "2018", 54 features: [ 55 "boringssl", 56 "default", 57 ], 58 // Link all crates statically to create a self-contained .so library. 59 rlibs: [ 60 "liblazy_static", 61 "liblibc", 62 "liblibm", 63 "liblog_rust", 64 "libring", 65 ], 66 prefer_rlib: true, 67 // For DnsResolver (Mainline module introduced in Q). 68 apex_available: [ 69 "//apex_available:platform", 70 "com.android.resolv", 71 ], 72 min_sdk_version: "29", 73} 74 75rust_ffi { 76 name: "libquiche_ffi", 77 defaults: ["libquiche_defaults"], 78 shared_libs: [ 79 "libcrypto", 80 "libssl", 81 ], 82 apex_available: [ 83 "//apex_available:platform", 84 "com.android.resolv", 85 ], 86 min_sdk_version: "29", 87} 88 89rust_library { 90 name: "libquiche", 91 defaults: ["libquiche_defaults"], 92 shared_libs: [ 93 "libcrypto", 94 "libssl", 95 ], 96} 97 98// This target is used by doh_unit_test to prevent compatibility issues 99// because doh_unit_test needs to be run on the R platform. 100rust_library_rlib { 101 name: "libquiche_static", 102 defaults: ["libquiche_defaults"], 103 static_libs: [ 104 "libcrypto_static", 105 "libssl", 106 ], 107 apex_available: [ 108 "//apex_available:platform", 109 "com.android.resolv", 110 ], 111 min_sdk_version: "29", 112} 113 114rust_defaults { 115 name: "quiche_test_defaults", 116 crate_name: "quiche", 117 cargo_env_compat: true, 118 srcs: ["src/lib.rs"], 119 test_suites: ["general-tests"], 120 auto_gen_config: true, 121 edition: "2018", 122 features: [ 123 "boringssl-vendored", 124 "default", 125 ], 126 rustlibs: [ 127 "liblazy_static", 128 "liblibc", 129 "liblibm", 130 "liblog_rust", 131 "libmio", 132 "libring", 133 "liburl", 134 ], 135 data: [ 136 "examples/cert.crt", 137 "examples/cert.key", 138 "examples/cert-big.crt", 139 "examples/rootca.crt", 140 ], 141} 142 143rust_test_host { 144 name: "quiche_host_test_src_lib", 145 defaults: ["quiche_test_defaults"], 146 test_options: { 147 unit_test: true, 148 }, 149 shared_libs: [ 150 "libcrypto", 151 "libssl", 152 ], 153} 154 155rust_test { 156 name: "quiche_device_test_src_lib", 157 defaults: ["quiche_test_defaults"], 158 // To run this test in R platform, it's required to statically link 159 // libcrypto and libssl. 160 static_libs: [ 161 "libcrypto_static", 162 "libssl", 163 ], 164} 165