Use Bazel SDK from CIPD.
Use released Bazel SDK (currently on available on CIPD).
Change-Id: I0ff17cfd82bdee7e955f292aa676992095862334
Reviewed-on: https://fuchsia-review.googlesource.com/c/sdk-samples/fortune-teller/+/796562
Reviewed-by: Chase Latta <chaselatta@google.com>
Commit-Queue: Darren Chan <chandarren@google.com>
Reviewed-by: Jiaming Li <lijiaming@google.com>
Fuchsia-Auto-Submit: Darren Chan <chandarren@google.com>
diff --git a/.gitmodules b/.gitmodules
index 818bf7a..e5f5edb 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,6 +1,3 @@
-[submodule "sdk-integration"]
- path = third_party/sdk-integration
- url = https://fuchsia.googlesource.com/sdk-integration
[submodule "third_party/googletest"]
path = third_party/googletest
url = https://fuchsia.googlesource.com/third_party/github.com/google/googletest/
diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel
index 35fadf2..3641b3b 100644
--- a/WORKSPACE.bazel
+++ b/WORKSPACE.bazel
@@ -2,9 +2,26 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-local_repository(
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+
+BAZEL_SDK_SHA256 = "7d0d418b20f33bb741f4b70966673ed97cf22b1a4bae809380836107a724d3cb"
+
+BAZEL_SDK_URL = "https://chrome-infra-packages.appspot.com/dl/fuchsia/sdk/core/fuchsia-bazel-rules/linux-amd64/+/version:11.20230207.2.1"
+
+# TODO(https://fxbug.dev/120912): Migrate off of @rules_fuchsia.
+http_archive(
name = "rules_fuchsia",
- path = "third_party/sdk-integration/bazel_rules_fuchsia",
+ sha256 = BAZEL_SDK_SHA256,
+ type = "zip",
+ url = BAZEL_SDK_URL,
+)
+
+# TODO(https://fxbug.dev/120912): Switch to the git submodule once available.
+http_archive(
+ name = "fuchsia_sdk",
+ sha256 = BAZEL_SDK_SHA256,
+ type = "zip",
+ url = BAZEL_SDK_URL,
)
local_repository(
@@ -12,19 +29,18 @@
path = "third_party/fuchsia-infra-bazel-rules",
)
+load("@fuchsia_infra//:workspace.bzl", "fuchsia_infra_workspace")
+
+fuchsia_infra_workspace()
+
load(
"@rules_fuchsia//fuchsia:deps.bzl",
"fuchsia_clang_repository",
- "fuchsia_sdk_repository",
"rules_fuchsia_deps",
)
rules_fuchsia_deps()
-fuchsia_sdk_repository(
- name = "fuchsia_sdk",
-)
-
register_toolchains("@fuchsia_sdk//:fuchsia_toolchain_sdk")
fuchsia_clang_repository(
@@ -42,9 +58,6 @@
path = "third_party/googletest",
)
-# bazel skylib.
-load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
-
http_archive(
name = "bazel_skylib",
sha256 = "f7be3474d42aae265405a592bb7da8e171919d74c16f082a5457840f06054728",
diff --git a/third_party/fuchsia-infra-bazel-rules b/third_party/fuchsia-infra-bazel-rules
index 91f75e0..524dcda 160000
--- a/third_party/fuchsia-infra-bazel-rules
+++ b/third_party/fuchsia-infra-bazel-rules
@@ -1 +1 @@
-Subproject commit 91f75e08363c66477a30a983248bd8524ffe50e9
+Subproject commit 524dcdabb3137088e80111aead5d67bc0d35ed0b
diff --git a/third_party/sdk-integration b/third_party/sdk-integration
deleted file mode 160000
index ba6dc9d..0000000
--- a/third_party/sdk-integration
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit ba6dc9de5313e621d31cb365d2c2bb9a3ff37a1f