fe753f5365
Officially, aconfig is build using the Android tool-chain. However, to speed up the local development cycle, add support for building with cargo. While it is possible to tell cargo to place the build artifacts outside the source tree, there is no way to tell it to not generate the cargo lock file in the same directory as Cargo.toml. Add a .gitignore to ignore Cargo.lock and the target directory. The way the Android build system and cargo generates code from the protobuf files is slightly different. Tell cargo to enable the "cargo" feature and introduce src/protos.rs to hide this difference from the rest of the aconfig source. Bug: 279485059 Test: m aconfig && aconfig Test: atest aconfig.test Test: cargo build Test: cargo test Change-Id: I85741f58cadae353ed95c124f566e4f4a7484186
15 lines
208 B
TOML
15 lines
208 B
TOML
[package]
|
|
name = "aconfig"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
build = "build.rs"
|
|
|
|
[features]
|
|
default = ["cargo"]
|
|
cargo = []
|
|
|
|
[dependencies]
|
|
protobuf = "3.2.0"
|
|
|
|
[build-dependencies]
|
|
protobuf-codegen = "3.2.0"
|