Skip to content

Commit

Permalink
Fix Android support when running the entire test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
Bencodes committed Oct 12, 2023
1 parent aea51a5 commit 66bd92a
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 0 deletions.
4 changes: 4 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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")
use_repo(remote_android_extensions, "android_gmaven_r8", "android_tools")

# Development dependencies

bazel_dep(name = "rules_jvm_external", version = "5.3")
Expand Down
7 changes: 7 additions & 0 deletions WORKSPACE.bzlmod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
load("@rules_android//android:rules.bzl", "android_sdk_repository")

maybe(
android_sdk_repository,
name = "androidsdk",
)
8 changes: 8 additions & 0 deletions WORKSPACE.dev.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,11 @@ load("//kotlin:repositories.bzl", "kotlin_repositories")
kotlin_repositories()

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

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

maybe(
android_sdk_repository,
name = "androidsdk",
)
18 changes: 18 additions & 0 deletions WORKSPACE.release.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
workspace(name = "rules_kotlin")

load("//src/main/starlark/core/repositories:download.bzl", "kt_download_local_dev_dependencies")

kt_download_local_dev_dependencies()

load("//kotlin:repositories.bzl", "kotlin_repositories")

kotlin_repositories()

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

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

maybe(
android_sdk_repository,
name = "androidsdk",
)

0 comments on commit 66bd92a

Please sign in to comment.