1// 2// Copyright (C) 2025 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15 16// Autogenerate the class (and respective headers) with logging methods and constants 17package { 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21genrule { 22 name: "statslog_dns_resolver.rs", 23 tools: ["stats-log-api-gen"], 24 cmd: "$(location stats-log-api-gen) --module resolv --rustHeaderCrate statslog_rust_header --rust $(genDir)/statslog_dns_resolver.rs", 25 out: [ 26 "statslog_dns_resolver.rs", 27 ], 28} 29 30rust_library { 31 name: "libstatslog_dns_resolver_rust", 32 crate_name: "statslog_dns_resolver_rust", 33 srcs: [ 34 "statslog_wrapper.rs", 35 ":statslog_dns_resolver.rs", 36 ], 37 rustlibs: [ 38 "libstatslog_rust_header", 39 "libstatspull_bindgen", 40 ], 41 flags: [ 42 "-A clippy::needless-lifetimes", 43 ], 44 apex_available: [ 45 "com.android.resolv", 46 ], 47 min_sdk_version: "29", 48} 49