Add Android.bp

Test: mm
Test: atest
Change-Id: I488658eb82aeae7369864b6fcf9bdc710ce3ad2f
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..bfe5e04
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,20 @@
+// This file is generated by cargo2android.py --run --device --dependencies --features=alloc,default,tinyvec_macros.
+
+rust_library {
+    name: "libtinyvec",
+    host_supported: true,
+    crate_name: "tinyvec",
+    srcs: ["src/lib.rs"],
+    edition: "2018",
+    features: [
+        "alloc",
+        "default",
+        "tinyvec_macros",
+    ],
+    rustlibs: [
+        "libtinyvec_macros",
+    ],
+}
+
+// dependent_library ["feature_list"]
+//   tinyvec_macros-0.1.0
diff --git a/TEST_MAPPING b/TEST_MAPPING
new file mode 100644
index 0000000..fb559f1
--- /dev/null
+++ b/TEST_MAPPING
@@ -0,0 +1,19 @@
+// Generated by cargo2android.py for tests in Android.bp
+{
+  "presubmit": [
+    {
+      "host": true,
+      "name": "tinyvec_host_test_src_lib"
+    },
+    {
+      "name": "tinyvec_device_test_src_lib"
+    },
+    {
+      "host": true,
+      "name": "tinyvec_host_test_tests_arrayvec"
+    },
+    {
+      "name": "tinyvec_device_test_tests_arrayvec"
+    }
+  ]
+}
diff --git a/patches/std.diff b/patches/std.diff
new file mode 100644
index 0000000..36d5c7d
--- /dev/null
+++ b/patches/std.diff
@@ -0,0 +1,14 @@
+diff --git a/src/lib.rs b/src/lib.rs
+index c26f0c5..ce06601 100644
+--- a/src/lib.rs
++++ b/src/lib.rs
+@@ -66,6 +66,9 @@
+ //!   the `Array` trait. The actual usage of the crate is not expected to break

+ //!   significantly in this transition.

+ 

++// ANDROID: Unconditionally use std to allow building as a dylib.

++extern crate std;

++

+ #[allow(unused_imports)]

+ use core::{

+   borrow::{Borrow, BorrowMut},

diff --git a/src/lib.rs b/src/lib.rs
index c26f0c5..ce06601 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -66,6 +66,9 @@
 //!   the `Array` trait. The actual usage of the crate is not expected to break

 //!   significantly in this transition.

 

+// ANDROID: Unconditionally use std to allow building as a dylib.

+extern crate std;

+

 #[allow(unused_imports)]

 use core::{

   borrow::{Borrow, BorrowMut},