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

Fix Android support when running the entire test suite #1051

Merged

Conversation

Bencodes
Copy link
Collaborator

@Bencodes Bencodes commented Oct 12, 2023

This project fails to build when using //... without the Android SDK and tools being instantiated.

This mirrors exactly what is being done in the rules_android repo.

load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
load("@rules_android//android:rules.bzl", "android_sdk_repository")

maybe(
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
load("@rules_android//android:rules.bzl", "android_sdk_repository")

maybe(
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will only get called when building within the rules_kotlin project. This repo shouldn't be initialized when depending on rules_kotlin as a set of rules.

@@ -24,6 +24,10 @@ use_repo(

register_toolchains("//kotlin/internal:default_toolchain")

# TODO(bencodes) We should be able to remove this once rules_android has rolled out official Bzlmod support
remote_android_extensions = use_extension("@bazel_tools//tools/android:android_extensions.bzl", "remote_android_tools_extensions")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Bencodes Bencodes merged commit ad7990e into master Oct 12, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants