Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Android-related tests to use Android Platforms flags #978

Open
katre opened this issue Oct 13, 2023 · 3 comments
Open

Update Android-related tests to use Android Platforms flags #978

katre opened this issue Oct 13, 2023 · 3 comments

Comments

@katre
Copy link
Member

katre commented Oct 13, 2023

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 (bazelbuild/bazel#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.

@meteorcloudy
Copy link
Member

/cc @shs96c

jin pushed a commit that referenced this issue Oct 16, 2023
Also disable Android platforms, see #978.
@katre
Copy link
Member Author

katre commented Oct 16, 2023

Fixed in #979

@katre katre closed this as completed Oct 16, 2023
@jin
Copy link
Member

jin commented Nov 22, 2023

Reopening to track re-enablement of these tests.

@jin jin reopened this Nov 22, 2023
jin added a commit to shs96c/rules_jvm_external that referenced this issue Nov 22, 2023
This adds the android_ndk and sets the appropriate default ndk specific
flags in preparation for --android_platforms and toolchain resolution enablement.

bazelbuild#978
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants