简体   繁体   English

如何在 Bazel 项目中为 d8 设置命令行标志?

[英]How do you set command line flags for d8 in a Bazel project?

For example if I wanted to set --min-api to 26: https://r8.googlesource.com/r8/+/b9cb6ae34047f19320885d9e2c594f81364fa896/src/main/java/com/android/tools/r8/D8CommandParser.java#120例如,如果我想将--min-api设置为 26: https : --min-api

I've tried various .bazelrc combinations with Bazel's -s flag on to see the subcommands called with their flags and I don't see anything being added as I'd would like:我已经尝试了各种带有 Bazel 的-s标志的.bazelrc组合,以查看使用其标志调用的子命令,但我没有看到任何添加的内容,因为我希望:

  • build:d8 --define=min-api=26
  • build:d8 --min-api=26
  • build:d8 --min-api 26

Ideally though this would be set somewhere in a BUILD file so it's configurable per target.理想情况下,这将设置在 BUILD 文件中的某个位置,因此它可以针对每个目标进行配置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM