| 
									
										
										
										
											2019-05-22 17:28:42 -07:00
										 |  |  | workspace( | 
					
						
							|  |  |  |     name = "angular", | 
					
						
							|  |  |  |     managed_directories = {"@npm": ["node_modules"]}, | 
					
						
							|  |  |  | ) | 
					
						
							| 
									
										
										
										
											2017-09-25 12:40:22 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-05 12:16:14 -08:00
										 |  |  | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | 
					
						
							| 
									
										
										
										
											2018-12-01 16:08:15 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | # Fetch rules_nodejs so we can install our npm dependencies | 
					
						
							|  |  |  | http_archive( | 
					
						
							|  |  |  |     name = "build_bazel_rules_nodejs", | 
					
						
							| 
									
										
										
										
											2020-04-11 09:15:16 -07:00
										 |  |  |     sha256 = "f9e7b9f42ae202cc2d2ce6d698ccb49a9f7f7ea572a78fd451696d03ef2ee116", | 
					
						
							|  |  |  |     urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.6.0/rules_nodejs-1.6.0.tar.gz"], | 
					
						
							| 
									
										
										
										
											2018-06-25 11:22:23 -07:00
										 |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-04 16:14:21 -08:00
										 |  |  | # Check the rules_nodejs version and download npm dependencies | 
					
						
							|  |  |  | # Note: bazel (version 2 and after) will check the .bazelversion file so we don't need to | 
					
						
							|  |  |  | # assert on that. | 
					
						
							|  |  |  | load("@build_bazel_rules_nodejs//:index.bzl", "check_rules_nodejs_version", "node_repositories", "yarn_install") | 
					
						
							| 
									
										
										
										
											2018-09-24 13:58:23 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-04-11 09:15:16 -07:00
										 |  |  | check_rules_nodejs_version(minimum_version_string = "1.6.0") | 
					
						
							| 
									
										
										
										
											2019-02-20 09:54:42 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | # Setup the Node.js toolchain | 
					
						
							| 
									
										
										
										
											2018-05-10 23:35:21 -07:00
										 |  |  | node_repositories( | 
					
						
							| 
									
										
										
										
											2019-06-17 19:17:19 +02:00
										 |  |  |     node_repositories = { | 
					
						
							| 
									
										
										
										
											2020-01-24 09:59:15 -08:00
										 |  |  |         "12.14.1-darwin_amd64": ("node-v12.14.1-darwin-x64.tar.gz", "node-v12.14.1-darwin-x64", "0be10a28737527a1e5e3784d3ad844d742fe8b0718acd701fd48f718fd3af78f"), | 
					
						
							|  |  |  |         "12.14.1-linux_amd64": ("node-v12.14.1-linux-x64.tar.xz", "node-v12.14.1-linux-x64", "07cfcaa0aa9d0fcb6e99725408d9e0b07be03b844701588e3ab5dbc395b98e1b"), | 
					
						
							|  |  |  |         "12.14.1-windows_amd64": ("node-v12.14.1-win-x64.zip", "node-v12.14.1-win-x64", "1f96ccce3ba045ecea3f458e189500adb90b8bc1a34de5d82fc10a5bf66ce7e3"), | 
					
						
							| 
									
										
										
										
											2019-06-17 19:17:19 +02:00
										 |  |  |     }, | 
					
						
							| 
									
										
										
										
											2020-01-24 09:59:15 -08:00
										 |  |  |     node_version = "12.14.1", | 
					
						
							| 
									
										
										
										
											2018-09-11 18:11:32 -07:00
										 |  |  |     package_json = ["//:package.json"], | 
					
						
							| 
									
										
										
										
											2018-05-10 23:35:21 -07:00
										 |  |  | ) | 
					
						
							| 
									
										
										
										
											2018-05-10 13:12:30 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-04 11:45:40 -08:00
										 |  |  | load("//integration:angular_integration_test.bzl", "npm_package_archives") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-20 09:54:42 -08:00
										 |  |  | yarn_install( | 
					
						
							|  |  |  |     name = "npm", | 
					
						
							| 
									
										
										
										
											2020-02-04 11:45:40 -08:00
										 |  |  |     manual_build_file_contents = npm_package_archives(), | 
					
						
							| 
									
										
										
										
											2019-02-20 09:54:42 -08:00
										 |  |  |     package_json = "//:package.json", | 
					
						
							| 
									
										
										
										
											2019-06-07 13:38:06 -07:00
										 |  |  |     yarn_lock = "//:yarn.lock", | 
					
						
							| 
									
										
										
										
											2019-02-20 09:54:42 -08:00
										 |  |  | ) | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-20 09:54:42 -08:00
										 |  |  | # Install all bazel dependencies of the @npm npm packages | 
					
						
							|  |  |  | load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies") | 
					
						
							| 
									
										
										
										
											2018-10-04 13:14:14 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | install_bazel_dependencies() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Load angular dependencies | 
					
						
							|  |  |  | load("//packages/bazel:package.bzl", "rules_angular_dev_dependencies") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | rules_angular_dev_dependencies() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-24 08:52:26 -07:00
										 |  |  | # Load protractor dependencies | 
					
						
							|  |  |  | load("@npm_bazel_protractor//:package.bzl", "npm_bazel_protractor_dependencies") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | npm_bazel_protractor_dependencies() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | # Load karma dependencies | 
					
						
							| 
									
										
										
										
											2019-09-27 15:49:59 -07:00
										 |  |  | load("@npm_bazel_karma//:package.bzl", "npm_bazel_karma_dependencies") | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-09-27 15:49:59 -07:00
										 |  |  | npm_bazel_karma_dependencies() | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Setup the rules_webtesting toolchain | 
					
						
							| 
									
										
										
										
											2019-02-13 09:33:48 -08:00
										 |  |  | load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories") | 
					
						
							| 
									
										
										
										
											2018-05-10 13:12:30 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | web_test_repositories() | 
					
						
							| 
									
										
										
										
											2018-09-24 13:58:23 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-04-24 10:26:36 -07:00
										 |  |  | load("//tools/browsers:browser_repositories.bzl", "browser_repositories") | 
					
						
							| 
									
										
										
										
											2019-02-13 09:33:48 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-11-01 11:17:10 -07:00
										 |  |  | browser_repositories() | 
					
						
							| 
									
										
										
										
											2018-05-10 13:12:30 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | # Setup the rules_typescript tooolchain | 
					
						
							| 
									
										
										
										
											2019-02-20 09:54:42 -08:00
										 |  |  | load("@npm_bazel_typescript//:index.bzl", "ts_setup_workspace") | 
					
						
							| 
									
										
										
										
											2018-05-10 13:12:30 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | ts_setup_workspace() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | # Setup the rules_sass toolchain | 
					
						
							| 
									
										
										
										
											2018-04-25 09:23:20 -07:00
										 |  |  | load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories") | 
					
						
							| 
									
										
										
										
											2018-09-24 13:58:23 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-25 09:23:20 -07:00
										 |  |  | sass_repositories() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | # Setup the skydoc toolchain | 
					
						
							| 
									
										
										
										
											2018-04-25 09:23:20 -07:00
										 |  |  | load("@io_bazel_skydoc//skylark:skylark.bzl", "skydoc_repositories") | 
					
						
							| 
									
										
										
										
											2018-09-24 13:58:23 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-25 09:23:20 -07:00
										 |  |  | skydoc_repositories() | 
					
						
							| 
									
										
										
										
											2019-03-15 13:45:20 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | load("@bazel_toolchains//rules:environments.bzl", "clang_env") | 
					
						
							|  |  |  | load("@bazel_toolchains//rules:rbe_repo.bzl", "rbe_autoconfig") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | rbe_autoconfig( | 
					
						
							|  |  |  |     name = "rbe_ubuntu1604_angular", | 
					
						
							| 
									
										
										
										
											2019-06-25 10:07:01 +02:00
										 |  |  |     # Need to specify a base container digest in order to ensure that we can use the checked-in | 
					
						
							|  |  |  |     # platform configurations for the "ubuntu16_04" image. Otherwise the autoconfig rule would | 
					
						
							|  |  |  |     # need to pull the image and run it in order determine the toolchain configuration. See: | 
					
						
							| 
									
										
										
										
											2019-11-14 11:37:09 +01:00
										 |  |  |     # https://github.com/bazelbuild/bazel-toolchains/blob/1.1.2/configs/ubuntu16_04_clang/versions.bzl | 
					
						
							|  |  |  |     base_container_digest = "sha256:1ab40405810effefa0b2f45824d6d608634ccddbf06366760c341ef6fbead011", | 
					
						
							| 
									
										
										
										
											2019-03-15 13:45:20 -04:00
										 |  |  |     # Note that if you change the `digest`, you might also need to update the | 
					
						
							|  |  |  |     # `base_container_digest` to make sure marketplace.gcr.io/google/rbe-ubuntu16-04-webtest:<digest> | 
					
						
							|  |  |  |     # and marketplace.gcr.io/google/rbe-ubuntu16-04:<base_container_digest> have | 
					
						
							| 
									
										
										
										
											2019-06-25 10:07:01 +02:00
										 |  |  |     # the same Clang and JDK installed. Clang is needed because of the dependency on | 
					
						
							|  |  |  |     # @com_google_protobuf. Java is needed for the Bazel's test executor Java tool. | 
					
						
							| 
									
										
										
										
											2019-11-14 11:37:09 +01:00
										 |  |  |     digest = "sha256:0b8fa87db4b8e5366717a7164342a029d1348d2feea7ecc4b18c780bc2507059", | 
					
						
							| 
									
										
										
										
											2019-03-15 13:45:20 -04:00
										 |  |  |     env = clang_env(), | 
					
						
							|  |  |  |     registry = "marketplace.gcr.io", | 
					
						
							| 
									
										
										
										
											2019-06-25 10:07:01 +02:00
										 |  |  |     # We can't use the default "ubuntu16_04" RBE image provided by the autoconfig because we need | 
					
						
							|  |  |  |     # a specific Linux kernel that comes with "libx11" in order to run headless browser tests. | 
					
						
							| 
									
										
										
										
											2019-03-15 13:45:20 -04:00
										 |  |  |     repository = "google/rbe-ubuntu16-04-webtest", | 
					
						
							|  |  |  | ) |