build: upgrade bazel rules to latest (#20768)
Add enough BUILD files to make it possible to `bazel build packages/core/test` Also re-format BUILD.bazel files with Buildifier. Add a CI lint check that they stay formatted. PR Close #20768
This commit is contained in:
@ -1,15 +1,19 @@
|
||||
package(default_visibility=["//visibility:public"])
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
|
||||
|
||||
ts_library(
|
||||
name = "common",
|
||||
srcs = glob(["**/*.ts"], exclude=[
|
||||
"http/**",
|
||||
"locales/**",
|
||||
"test/**",
|
||||
"testing/**",
|
||||
]),
|
||||
srcs = glob(
|
||||
[
|
||||
"*.ts",
|
||||
"src/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/common",
|
||||
deps = ["//packages/core"],
|
||||
tsconfig = ":tsconfig-build.json",
|
||||
tsconfig = "//packages:tsconfig",
|
||||
deps = [
|
||||
"//packages/core",
|
||||
"@rxjs",
|
||||
],
|
||||
)
|
||||
|
20
packages/common/http/BUILD.bazel
Normal file
20
packages/common/http/BUILD.bazel
Normal file
@ -0,0 +1,20 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
|
||||
|
||||
ts_library(
|
||||
name = "http",
|
||||
srcs = glob(
|
||||
[
|
||||
"*.ts",
|
||||
"src/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/common/http",
|
||||
tsconfig = "//packages:tsconfig",
|
||||
deps = [
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
"@rxjs",
|
||||
],
|
||||
)
|
14
packages/common/http/testing/BUILD.bazel
Normal file
14
packages/common/http/testing/BUILD.bazel
Normal file
@ -0,0 +1,14 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
|
||||
|
||||
ts_library(
|
||||
name = "testing",
|
||||
testonly = 1,
|
||||
srcs = glob(["testing/**/*.ts"]),
|
||||
module_name = "@angular/common/http/testing",
|
||||
tsconfig = "//packages:tsconfig",
|
||||
deps = [
|
||||
"//packages/common/http",
|
||||
],
|
||||
)
|
16
packages/common/testing/BUILD.bazel
Normal file
16
packages/common/testing/BUILD.bazel
Normal file
@ -0,0 +1,16 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
|
||||
|
||||
ts_library(
|
||||
name = "testing",
|
||||
testonly = 1,
|
||||
srcs = glob(["**/*.ts"]),
|
||||
module_name = "@angular/common/testing",
|
||||
tsconfig = "//packages:tsconfig",
|
||||
deps = [
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
"@rxjs",
|
||||
],
|
||||
)
|
Reference in New Issue
Block a user