From b06c42a03c01f387343a6c5aedabde3c26000ce8 Mon Sep 17 00:00:00 2001 From: Joel Galenson Date: Tue, 31 Aug 2021 14:28:48 -0700 Subject: [PATCH] Generate cargo_pkg_version and cargo_env_compat for defaults. The existing code only adds it to things without defaults. This adds it to the defaults module itself, which should not overlap the existing code. Test: Run and see new entries. Change-Id: Iaf3d0b47193bb1f54cdc605c88c2cd68034d963a --- scripts/cargo2android.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/cargo2android.py b/scripts/cargo2android.py index 33ab58455..36c170ca2 100755 --- a/scripts/cargo2android.py +++ b/scripts/cargo2android.py @@ -645,6 +645,9 @@ class Crate(object): if self.has_warning and not self.cap_lints: self.write(' // has rustc warnings') self.dump_srcs_list() + if self.cargo_env_compat: + self.write(' cargo_env_compat: true,') + self.write(' cargo_pkg_version: "' + self.cargo_pkg_version + '",') if 'test' in self.crate_types: self.write(' test_suites: ["general-tests"],') self.write(' auto_gen_config: true,')