package {
    default_applicable_licenses: ["Android-Apache-2.0"],
}

rust_defaults {
    name: "aflags.defaults",
    edition: "2021",
    clippy_lints: "android",
    lints: "android",
    srcs: ["src/main.rs"],
    rustlibs: [
        "libaconfig_device_paths",
        "libaconfig_flags",
        "libaconfig_protos",
        "libaconfigd_protos_rust",
        "libaconfig_storage_read_api",
        "libaconfig_storage_file",
        "libanyhow",
        "libclap",
        "libnix",
        "libprotobuf",
        "libregex",
        // TODO: b/371021174 remove this fake dependency once we find a proper strategy to
        // deal with test aconfig libs are not present in storage because they are never used
        // by the actual build
        "libaconfig_test_rust_library",
    ],
}

rust_binary {
    name: "aflags",
    host_supported: true,
    defaults: ["aflags.defaults"],
}

rust_test_host {
    name: "aflags.test",
    defaults: ["aflags.defaults"],
    test_suites: ["general-tests"],
}
