rules_jvm_external icon indicating copy to clipboard operation
rules_jvm_external copied to clipboard

Update Android-related tests to use Android Platforms flags

Open katre opened this issue 1 year ago • 3 comments

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.

katre avatar Oct 13 '23 19:10 katre

/cc @shs96c

meteorcloudy avatar Oct 16 '23 13:10 meteorcloudy

Fixed in #979

katre avatar Oct 16 '23 13:10 katre

Reopening to track re-enablement of these tests.

jin avatar Nov 22 '23 13:11 jin