Import protobuf-codegen-2.14.0 * Add OWNERS, Android.bp, and README.android. * Hard code version number in src/lib.rs for now. It could be in a smarter update_package.sh to get the new version number from Cargo.tom. But until then, the difference in lib.rs will be caught and fixed manually. * Rename protoc_gen_rust to protoc-gen-rust for aprotoc plugin. Bug: 143953733 Test: make Change-Id: I9b3c3b9f2e7ad0eb203c26534f2b6ba5fac46eef
diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..2d4ef0a --- /dev/null +++ b/Android.bp
@@ -0,0 +1,38 @@ +// This file is generated by cargo2android.py --run --dependencies. + +// Rename protoc_gen_rust to protoc-gen-rust for aprotoc plugin. + +rust_library_host_rlib { + name: "libprotobuf_codegen", + crate_name: "protobuf_codegen", + srcs: ["src/lib.rs"], + edition: "2015", + rlibs: [ + "libprotobuf", + ], +} + +// rust_binary_host { +// name: "protobuf_bin_gen_rust_do_not_use", +// crate_name: "protobuf_bin_gen_rust_do_not_use", +// srcs: ["src/bin/protobuf-bin-gen-rust-do-not-use.rs"], +// edition: "2015", +// rlibs: [ +// "libprotobuf", +// "libprotobuf_codegen", +// ], +// } + +rust_binary_host { + name: "protoc-gen-rust", + crate_name: "protoc_gen_rust", + srcs: ["src/bin/protoc-gen-rust.rs"], + edition: "2015", + rlibs: [ + "libprotobuf", + "libprotobuf_codegen", + ], +} + +// dependent_library ["feature_list"] +// protobuf-2.14.0