-
Notifications
You must be signed in to change notification settings - Fork 213
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
Fix Android support when running the entire test suite #1051
Conversation
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") | ||
load("@rules_android//android:rules.bzl", "android_sdk_repository") | ||
|
||
maybe( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mirroring what's being done in rules_android
https://github.com/bazelbuild/rules_android/blob/main/WORKSPACE.bzlmod#L8
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") | ||
load("@rules_android//android:rules.bzl", "android_sdk_repository") | ||
|
||
maybe( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mirroring what's being done in rules_android
https://github.com/bazelbuild/rules_android/blob/main/WORKSPACE.bzlmod#L8
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mirroring what's being done in rules_android
https://github.com/bazelbuild/rules_android/blob/main/MODULE.bazel#L63-L64
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.