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

217 views Asked by At

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

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:

  • 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.

1

There are 1 answers