rules_jvm_external
rules_jvm_external copied to clipboard
Update Android-related tests to use Android Platforms flags
A few test targets in this project are using either android_binary
or aar_import
targets, and so need to be updated to work with Android platforms (https://github.com/bazelbuild/bazel/issues/16285).
Test //tests/unit/aar_import/...
is relatively easy: we need to define a platform
with the android OS constraint and use that with the --platforms
flag (because these are not part of an actual android_binary
, we cannot use --android_platforms
.
Test //tests/integration/override_targets/...
is harder: when I did the above (using --android_platforms
because this is an android_binary
), I got very confusing errors due to the override_targets
feature that is being tested. It looked from the errors as if the //tests/integration/override_targets:sceneform_rendering
target is being configured both as a dependency of :app
(which is correct), and in the top-level configuration (which is wrong, and causes build errors because the target platform is wrong).
I don't understand the override targets feature but this feels like a bug to me.
For now I am sending a PR to disable Android platforms for these tests, but this should be addressed.
/cc @shs96c
Fixed in #979
Reopening to track re-enablement of these tests.