blob: 9f055dce49039d4045a8d2b02c0ab6ab1733c6c1 [file] [log] [blame]
Joel Galenson2398e022021-08-24 08:49:34 -07001// This file is generated by cargo2android.py --config cargo2android.json.
Seth Moore8cc6a242021-04-02 16:52:39 +00002// Do not modify this file as changes will be overridden on upgrade.
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -07003
4// We renamed the shared_libs dependence from libsqlite3 to libsqlite.
Matthew Maurer5856e852020-08-10 16:31:06 -07005// srcs has been moved out of _defaults to work around b/163420435
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -07006
Bob Badour0f6dcf72021-02-12 18:24:18 -08007package {
8 default_applicable_licenses: [
9 "external_rust_crates_libsqlite3-sys_license",
10 ],
11}
12
13// Added automatically by a large-scale-change that took the approach of
14// 'apply every license found to every target'. While this makes sure we respect
15// every license restriction, it may not be entirely correct.
16//
17// e.g. GPL in an MIT project might only apply to the contrib/ directory.
18//
19// Please consider splitting the single license below into multiple licenses,
20// taking care not to lose any license_kind information, and overriding the
21// default license using the 'licenses: [...]' property on targets as needed.
22//
23// For unused files, consider creating a 'fileGroup' with "//visibility:private"
24// to attach the license to, and including a comment whether the files may be
25// used in the current project.
26// See: http://go/android-license-faq
27license {
28 name: "external_rust_crates_libsqlite3-sys_license",
29 visibility: [":__subpackages__"],
30 license_kinds: [
31 "SPDX-license-identifier-MIT",
32 "legacy_permissive",
33 ],
34 license_text: [
35 "LICENSE",
36 ],
37}
38
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -070039rust_library {
40 name: "liblibsqlite3_sys",
41 host_supported: true,
42 crate_name: "libsqlite3_sys",
Joel Galenson2398e022021-08-24 08:49:34 -070043 cargo_env_compat: true,
Matthew Maurer5856e852020-08-10 16:31:06 -070044 srcs: [
45 "src/lib.rs",
46 ":libsqlite3_bindgen",
47 ],
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -070048 edition: "2018",
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -070049 features: [
50 "default",
51 "min_sqlite_version_3_6_8",
52 "pkg-config",
53 "vcpkg",
54 ],
Joel Galenson1f38c4a2021-11-29 14:04:12 -080055 shared_libs: ["libsqlite"],
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -070056}
57
58rust_test {
Joel Galenson1f38c4a2021-11-29 14:04:12 -080059 name: "libsqlite3-sys_test_src_lib",
60 host_supported: true,
61 crate_name: "libsqlite3_sys",
62 cargo_env_compat: true,
Matthew Maurer5856e852020-08-10 16:31:06 -070063 srcs: [
64 "src/lib.rs",
65 ":libsqlite3_bindgen",
66 ],
Joel Galenson1f38c4a2021-11-29 14:04:12 -080067 test_suites: ["general-tests"],
68 auto_gen_config: true,
69 test_options: {
70 unit_test: true,
71 },
72 edition: "2018",
73 features: [
74 "default",
75 "min_sqlite_version_3_6_8",
76 "pkg-config",
77 "vcpkg",
78 ],
79 shared_libs: ["libsqlite"],
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -070080}
81
Matthew Maurer5856e852020-08-10 16:31:06 -070082rust_bindgen {
83 name: "libsqlite3_bindgen",
84 host_supported: true,
85 crate_name: "sqlite3_bindgen",
86 custom_bindgen: "sqlite3_bindgen_build",
87 wrapper_src: "wrapper.h",
88 source_stem: "bindgen",
Seth Moore8cc6a242021-04-02 16:52:39 +000089 cflags: ["-I external/sqlite/dist"],
90 defaults: ["sqlite-defaults"],
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -070091}
Joel Galensond39f4472021-08-24 09:19:42 -070092
93rust_test {
94 name: "libsqlite3_bindgen_test",
95 srcs: [":libsqlite3_bindgen"],
96 crate_name: "sqlite3_bindgen_test",
97 test_suites: ["general-tests"],
98 auto_gen_config: true,
99 clippy_lints: "none",
100 lints: "none",
101}
Jiyong Park8e5c8e82021-09-14 09:31:54 +0900102
103rust_library {
104 name: "liblibsqlite3_sys_noicu",
105 host_supported: true,
106 crate_name: "libsqlite3_sys",
107 cargo_env_compat: true,
108 srcs: [
109 "src/lib.rs",
110 ":libsqlite3_bindgen",
111 ],
112 edition: "2018",
113 features: [
114 "default",
115 "min_sqlite_version_3_6_8",
116 "pkg-config",
117 "vcpkg",
118 ],
119 static_libs: [
120 "libsqlite_static_noicu",
121 ],
122}
123