bazel-contrib / bazel-contrib/rules_jvm_external

Update Android-related tests to use Android Platforms flags

Open
#978 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
373
Forks
301
Avg merge
7d 17h
Merged PRs (30d)
3

Description

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.

Contributor guide

Open the contributing guide

Research direction

Start with the targets under //tests/unit/aar_import/... and define the Android platform used with --platforms. Then investigate //tests/integration/override_targets/... and the sceneform_rendering configuration with --android_platforms, focusing on why the target appears in both dependency and top-level configurations. Done means both test areas work with Android platforms without the confusing configuration errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
build-system, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.