2017-12-19 18:03:29 -05:00
|
|
|
workspace(name = "angular")
|
2017-09-25 15:40:22 -04:00
|
|
|
|
2018-12-05 15:16:14 -05:00
|
|
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
2018-09-27 01:20:16 -04:00
|
|
|
load(
|
2018-10-15 19:51:26 -04:00
|
|
|
"//packages/bazel:package.bzl",
|
2018-09-27 01:20:16 -04:00
|
|
|
"rules_angular_dependencies",
|
|
|
|
"rules_angular_dev_dependencies",
|
2018-04-25 12:23:20 -04:00
|
|
|
)
|
|
|
|
|
2018-12-01 19:08:15 -05:00
|
|
|
http_archive(
|
|
|
|
name = "io_bazel_rules_go",
|
|
|
|
sha256 = "b7a62250a3a73277ade0ce306d22f122365b513f5402222403e507f2f997d421",
|
|
|
|
url = "https://github.com/bazelbuild/rules_go/releases/download/0.16.3/rules_go-0.16.3.tar.gz",
|
|
|
|
)
|
|
|
|
|
2018-10-22 17:26:52 -04:00
|
|
|
# Uncomment for local bazel rules development
|
|
|
|
#local_repository(
|
|
|
|
# name = "build_bazel_rules_nodejs",
|
|
|
|
# path = "../rules_nodejs",
|
|
|
|
#)
|
|
|
|
#local_repository(
|
|
|
|
# name = "build_bazel_rules_typescript",
|
|
|
|
# path = "../rules_typescript",
|
|
|
|
#)
|
|
|
|
|
2018-09-27 01:20:16 -04:00
|
|
|
# Angular Bazel users will call this function
|
|
|
|
rules_angular_dependencies()
|
2018-12-06 17:46:51 -05:00
|
|
|
|
2018-12-01 19:08:15 -05:00
|
|
|
# Install transitive deps of rules_nodejs
|
|
|
|
load("@build_bazel_rules_nodejs//:package.bzl", "rules_nodejs_dependencies")
|
|
|
|
|
|
|
|
rules_nodejs_dependencies()
|
|
|
|
|
2018-09-27 01:20:16 -04:00
|
|
|
# These are the dependencies only for us
|
|
|
|
rules_angular_dev_dependencies()
|
2018-05-10 16:12:30 -04:00
|
|
|
|
2018-11-26 00:13:52 -05:00
|
|
|
# Install transitive deps of rules_typescript
|
|
|
|
load("@build_bazel_rules_typescript//:package.bzl", "rules_typescript_dependencies")
|
2018-12-06 17:46:51 -05:00
|
|
|
|
2018-11-26 00:13:52 -05:00
|
|
|
rules_typescript_dependencies()
|
|
|
|
|
2018-06-25 14:22:23 -04:00
|
|
|
#
|
|
|
|
# Point Bazel to WORKSPACEs that live in subdirectories
|
|
|
|
#
|
2018-10-15 19:51:26 -04:00
|
|
|
http_archive(
|
2018-06-25 14:22:23 -04:00
|
|
|
name = "rxjs",
|
2018-10-15 19:51:26 -04:00
|
|
|
sha256 = "72b0b4e517f43358f554c125e40e39f67688cd2738a8998b4a266981ed32f403",
|
2018-12-06 17:46:51 -05:00
|
|
|
strip_prefix = "package/src",
|
|
|
|
url = "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.3.tgz",
|
2018-06-25 14:22:23 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
# Point to the integration test workspace just so that Bazel doesn't descend into it
|
|
|
|
# when expanding the //... pattern
|
|
|
|
local_repository(
|
|
|
|
name = "bazel_integration_test",
|
|
|
|
path = "integration/bazel",
|
|
|
|
)
|
|
|
|
|
2018-05-10 16:12:30 -04:00
|
|
|
#
|
|
|
|
# Load and install our dependencies downloaded above.
|
|
|
|
#
|
2018-10-04 16:14:14 -04:00
|
|
|
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install")
|
2018-05-10 16:12:30 -04:00
|
|
|
|
2019-01-04 15:35:57 -05:00
|
|
|
# Bazel version must be at least v0.21.0 because:
|
2019-01-28 13:30:18 -05:00
|
|
|
# - 0.21.0 Using --incompatible_strict_action_env flag fixes cache when running `yarn bazel`
|
|
|
|
# (see https://github.com/angular/angular/issues/27514#issuecomment-451438271)
|
2019-01-04 15:35:57 -05:00
|
|
|
check_bazel_version("0.21.0", """
|
2018-12-01 19:08:15 -05:00
|
|
|
You no longer need to install Bazel on your machine.
|
|
|
|
Angular has a dependency on the @bazel/bazel package which supplies it.
|
|
|
|
Try running `yarn bazel` instead.
|
|
|
|
(If you did run that, check that you've got a fresh `yarn install`)
|
2018-08-05 22:10:07 -04:00
|
|
|
|
|
|
|
""")
|
2018-09-24 16:58:23 -04:00
|
|
|
|
2018-05-11 02:35:21 -04:00
|
|
|
node_repositories(
|
2018-09-24 16:58:23 -04:00
|
|
|
node_version = "10.9.0",
|
2018-09-11 21:11:32 -04:00
|
|
|
package_json = ["//:package.json"],
|
|
|
|
preserve_symlinks = True,
|
2018-11-20 09:21:05 -05:00
|
|
|
yarn_version = "1.12.1",
|
2018-05-11 02:35:21 -04:00
|
|
|
)
|
2018-05-10 16:12:30 -04:00
|
|
|
|
2018-12-04 19:28:58 -05:00
|
|
|
local_repository(
|
2018-10-04 16:14:14 -04:00
|
|
|
name = "npm",
|
2018-12-04 19:28:58 -05:00
|
|
|
path = "tools/npm_workspace",
|
2018-10-04 16:14:14 -04:00
|
|
|
)
|
|
|
|
|
2018-12-06 17:46:51 -05:00
|
|
|
load("@io_bazel_rules_go//go:def.bzl", "go_register_toolchains", "go_rules_dependencies")
|
2018-05-10 16:12:30 -04:00
|
|
|
|
|
|
|
go_rules_dependencies()
|
2018-09-24 16:58:23 -04:00
|
|
|
|
2018-05-10 16:12:30 -04:00
|
|
|
go_register_toolchains()
|
|
|
|
|
|
|
|
load("@io_bazel_rules_webtesting//web:repositories.bzl", "browser_repositories", "web_test_repositories")
|
|
|
|
|
|
|
|
web_test_repositories()
|
2018-09-24 16:58:23 -04:00
|
|
|
|
2018-05-10 16:12:30 -04:00
|
|
|
browser_repositories(
|
|
|
|
chromium = True,
|
|
|
|
firefox = True,
|
|
|
|
)
|
|
|
|
|
|
|
|
load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace")
|
|
|
|
|
|
|
|
ts_setup_workspace()
|
|
|
|
|
2018-06-25 14:22:23 -04:00
|
|
|
load("@angular//:index.bzl", "ng_setup_workspace")
|
2018-05-11 02:35:21 -04:00
|
|
|
|
|
|
|
ng_setup_workspace()
|
|
|
|
|
2018-04-25 12:23:20 -04:00
|
|
|
##################################
|
|
|
|
# Skylark documentation generation
|
|
|
|
|
|
|
|
load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")
|
2018-09-24 16:58:23 -04:00
|
|
|
|
2018-04-25 12:23:20 -04:00
|
|
|
sass_repositories()
|
|
|
|
|
|
|
|
load("@io_bazel_skydoc//skylark:skylark.bzl", "skydoc_repositories")
|
2018-09-24 16:58:23 -04:00
|
|
|
|
2018-04-25 12:23:20 -04:00
|
|
|
skydoc_repositories()
|