| Chih-Hung Hsieh | 6d88908 | 2020-07-16 16:27:49 -0700 | [diff] [blame] | 1 | // This file is generated by cargo2android.py --device --run --dependencies --tests. |
| 2 | |
| Bob Badour | 1a99861 | 2021-02-12 17:13:57 -0800 | [diff] [blame] | 3 | package { |
| 4 | default_applicable_licenses: ["external_rust_crates_getrandom_license"], |
| 5 | } |
| 6 | |
| 7 | // Added automatically by a large-scale-change that took the approach of |
| 8 | // 'apply every license found to every target'. While this makes sure we respect |
| 9 | // every license restriction, it may not be entirely correct. |
| 10 | // |
| 11 | // e.g. GPL in an MIT project might only apply to the contrib/ directory. |
| 12 | // |
| 13 | // Please consider splitting the single license below into multiple licenses, |
| 14 | // taking care not to lose any license_kind information, and overriding the |
| 15 | // default license using the 'licenses: [...]' property on targets as needed. |
| 16 | // |
| 17 | // For unused files, consider creating a 'fileGroup' with "//visibility:private" |
| 18 | // to attach the license to, and including a comment whether the files may be |
| 19 | // used in the current project. |
| 20 | // |
| 21 | // large-scale-change included anything that looked like it might be a license |
| 22 | // text as a license_text. e.g. LICENSE, NOTICE, COPYING etc. |
| 23 | // |
| 24 | // Please consider removing redundant or irrelevant files from 'license_text:'. |
| 25 | // See: http://go/android-license-faq |
| 26 | license { |
| 27 | name: "external_rust_crates_getrandom_license", |
| 28 | visibility: [":__subpackages__"], |
| 29 | license_kinds: [ |
| 30 | "SPDX-license-identifier-Apache-2.0", |
| 31 | "SPDX-license-identifier-MIT", |
| 32 | ], |
| 33 | license_text: [ |
| 34 | "LICENSE-APACHE", |
| 35 | "LICENSE-MIT", |
| 36 | ], |
| 37 | } |
| 38 | |
| Chih-Hung Hsieh | 6d88908 | 2020-07-16 16:27:49 -0700 | [diff] [blame] | 39 | rust_defaults { |
| 40 | name: "getrandom_defaults", |
| 41 | crate_name: "getrandom", |
| Chih-Hung Hsieh | 70255fc | 2020-07-17 16:44:42 -0700 | [diff] [blame] | 42 | srcs: ["src/lib.rs"], |
| Chih-Hung Hsieh | 6d88908 | 2020-07-16 16:27:49 -0700 | [diff] [blame] | 43 | test_suites: ["general-tests"], |
| 44 | auto_gen_config: true, |
| 45 | edition: "2018", |
| 46 | rustlibs: [ |
| 47 | "libcfg_if", |
| 48 | "liblibc", |
| 49 | ], |
| 50 | } |
| 51 | |
| 52 | rust_test_host { |
| 53 | name: "getrandom_host_test_src_lib", |
| 54 | defaults: ["getrandom_defaults"], |
| Chih-Hung Hsieh | 6d88908 | 2020-07-16 16:27:49 -0700 | [diff] [blame] | 55 | } |
| 56 | |
| 57 | rust_test { |
| 58 | name: "getrandom_device_test_src_lib", |
| 59 | defaults: ["getrandom_defaults"], |
| Chih-Hung Hsieh | 6d88908 | 2020-07-16 16:27:49 -0700 | [diff] [blame] | 60 | } |
| 61 | |
| 62 | rust_defaults { |
| 63 | name: "getrandom_defaults_common", |
| 64 | crate_name: "common", |
| Chih-Hung Hsieh | 70255fc | 2020-07-17 16:44:42 -0700 | [diff] [blame] | 65 | srcs: ["tests/common.rs"], |
| Chih-Hung Hsieh | 6d88908 | 2020-07-16 16:27:49 -0700 | [diff] [blame] | 66 | test_suites: ["general-tests"], |
| 67 | auto_gen_config: true, |
| 68 | edition: "2018", |
| 69 | rustlibs: [ |
| 70 | "libcfg_if", |
| 71 | "libgetrandom", |
| 72 | "liblibc", |
| 73 | ], |
| 74 | } |
| 75 | |
| 76 | rust_test_host { |
| 77 | name: "getrandom_host_test_tests_common", |
| 78 | defaults: ["getrandom_defaults_common"], |
| Chih-Hung Hsieh | 6d88908 | 2020-07-16 16:27:49 -0700 | [diff] [blame] | 79 | } |
| 80 | |
| 81 | rust_test { |
| 82 | name: "getrandom_device_test_tests_common", |
| 83 | defaults: ["getrandom_defaults_common"], |
| Chih-Hung Hsieh | 6d88908 | 2020-07-16 16:27:49 -0700 | [diff] [blame] | 84 | } |
| Joel Galenson | e5254a5 | 2020-07-07 13:20:14 -0700 | [diff] [blame] | 85 | |
| 86 | rust_library { |
| 87 | name: "libgetrandom", |
| 88 | host_supported: true, |
| 89 | crate_name: "getrandom", |
| 90 | srcs: ["src/lib.rs"], |
| 91 | edition: "2018", |
| 92 | rustlibs: [ |
| 93 | "libcfg_if", |
| 94 | "liblibc", |
| 95 | ], |
| 96 | } |
| Chih-Hung Hsieh | a11d065 | 2020-07-12 14:18:44 -0700 | [diff] [blame] | 97 | |
| 98 | // dependent_library ["feature_list"] |
| 99 | // cfg-if-0.1.10 |
| 100 | // libc-0.2.72 |