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
diff --git a/scripts/cargo2android.py b/scripts/cargo2android.py
index 33ab584..36c170c 100755
--- a/scripts/cargo2android.py
+++ b/scripts/cargo2android.py
@@ -645,6 +645,9 @@
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,')