Implement a helper function to make it easier for unit tests to diff (and find the first difference) generated code and expected code. Bug: 283910447 Test: atest aconfig.test Change-Id: I460e8fbf05e8f33e8a62ecef67b2d9d77051e876
42 lines
799 B
Plaintext
42 lines
799 B
Plaintext
package {
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
|
}
|
|
|
|
rust_protobuf_host {
|
|
name: "libaconfig_protos",
|
|
protos: ["protos/aconfig.proto"],
|
|
crate_name: "aconfig_protos",
|
|
source_stem: "aconfig_protos",
|
|
use_protobuf3: true,
|
|
}
|
|
|
|
rust_defaults {
|
|
name: "aconfig.defaults",
|
|
edition: "2021",
|
|
clippy_lints: "android",
|
|
lints: "android",
|
|
srcs: ["src/main.rs"],
|
|
rustlibs: [
|
|
"libaconfig_protos",
|
|
"libanyhow",
|
|
"libclap",
|
|
"libprotobuf",
|
|
"libserde",
|
|
"libserde_json",
|
|
"libtinytemplate",
|
|
],
|
|
}
|
|
|
|
rust_binary_host {
|
|
name: "aconfig",
|
|
defaults: ["aconfig.defaults"],
|
|
}
|
|
|
|
rust_test_host {
|
|
name: "aconfig.test",
|
|
defaults: ["aconfig.defaults"],
|
|
rustlibs: [
|
|
"libitertools",
|
|
],
|
|
}
|