| 
									
										
										
										
											2020-03-02 11:10:11 -08:00
										 |  |  | workspace(name = "bazel_integration_test") | 
					
						
							| 
									
										
										
										
											2017-12-06 06:56:49 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-01 16:08:15 -08:00
										 |  |  | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											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-02-07 16:14:53 -08:00
										 |  |  |     sha256 = "b6670f9f43faa66e3009488bbd909bc7bc46a5a9661a33f6bc578068d1837f37", | 
					
						
							|  |  |  |     urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.3.0/rules_nodejs-1.3.0.tar.gz"], | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Fetch sass rules for compiling sass files | 
					
						
							|  |  |  | http_archive( | 
					
						
							|  |  |  |     name = "io_bazel_rules_sass", | 
					
						
							| 
									
										
										
										
											2019-11-27 14:12:10 -08:00
										 |  |  |     sha256 = "77e241148f26d5dbb98f96fe0029d8f221c6cb75edbb83e781e08ac7f5322c5f", | 
					
						
							|  |  |  |     strip_prefix = "rules_sass-1.24.0", | 
					
						
							|  |  |  |     urls = [ | 
					
						
							|  |  |  |         "https://github.com/bazelbuild/rules_sass/archive/1.24.0.zip", | 
					
						
							|  |  |  |         "https://mirror.bazel.build/github.com/bazelbuild/rules_sass/archive/1.24.0.zip", | 
					
						
							|  |  |  |     ], | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | ) | 
					
						
							| 
									
										
										
										
											2018-06-25 11:22:23 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | # Check the bazel version and download npm dependencies | 
					
						
							| 
									
										
										
										
											2019-10-25 01:13:43 -07:00
										 |  |  | load("@build_bazel_rules_nodejs//:index.bzl", "check_bazel_version", "node_repositories", "yarn_install") | 
					
						
							| 
									
										
										
										
											2018-05-29 15:35:48 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-22 17:28:42 -07:00
										 |  |  | # Bazel version must be at least the following version because: | 
					
						
							|  |  |  | #   - 0.26.0 managed_directories feature added which is required for nodejs rules 0.30.0 | 
					
						
							| 
									
										
										
										
											2019-06-12 18:18:26 -07:00
										 |  |  | #   - 0.27.0 has a fix for managed_directories after `rm -rf node_modules` | 
					
						
							| 
									
										
										
										
											2019-02-26 13:30:44 +01:00
										 |  |  | check_bazel_version( | 
					
						
							|  |  |  |     message = """
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08: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-12-06 14:46:51 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-26 13:30:44 +01:00
										 |  |  | """,
 | 
					
						
							| 
									
										
										
										
											2019-06-12 18:18:26 -07:00
										 |  |  |     minimum_bazel_version = "0.27.0", | 
					
						
							| 
									
										
										
										
											2019-02-26 13:30:44 +01:00
										 |  |  | ) | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Setup the Node.js toolchain | 
					
						
							| 
									
										
										
										
											2018-09-05 12:38:53 -07:00
										 |  |  | node_repositories( | 
					
						
							| 
									
										
										
										
											2019-06-18 21:26:53 -07:00
										 |  |  |     # Use same node version as root angular WORKSPACE since | 
					
						
							|  |  |  |     # we share node_module packages and some require node >= 10.15.0 | 
					
						
							|  |  |  |     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-18 21:26:53 -07:00
										 |  |  |     }, | 
					
						
							| 
									
										
										
										
											2020-01-24 09:59:15 -08:00
										 |  |  |     node_version = "12.14.1", | 
					
						
							| 
									
										
										
										
											2019-03-20 15:55:31 -04:00
										 |  |  |     yarn_version = "1.12.1", | 
					
						
							| 
									
										
										
										
											2018-09-05 12:38:53 -07:00
										 |  |  | ) | 
					
						
							| 
									
										
										
										
											2018-05-29 15:35:48 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | # Install our npm dependencies into @npm | 
					
						
							| 
									
										
										
										
											2018-10-04 13:14:14 -07:00
										 |  |  | yarn_install( | 
					
						
							|  |  |  |     name = "npm", | 
					
						
							| 
									
										
										
										
											2019-05-22 17:28:42 -07:00
										 |  |  |     package_json = "//:package.json", | 
					
						
							| 
									
										
										
										
											2020-03-02 11:10:11 -08:00
										 |  |  |     # Turn off symlink_node_modules here as it causes flakiness with missing | 
					
						
							|  |  |  |     # files in node_modules. | 
					
						
							|  |  |  |     # TODO: track down the root cause of the flakiness; current suspect is that | 
					
						
							|  |  |  |     # it is an issue with managed_directories when resources are limited | 
					
						
							|  |  |  |     symlink_node_modules = False, | 
					
						
							| 
									
										
										
										
											2019-05-22 17:28:42 -07:00
										 |  |  |     yarn_lock = "//:yarn.lock", | 
					
						
							| 
									
										
										
										
											2018-10-04 13:14:14 -07:00
										 |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | # Install all bazel dependencies of our npm packages | 
					
						
							|  |  |  | load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | install_bazel_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-29 15:35:48 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | web_test_repositories() | 
					
						
							| 
									
										
										
										
											2018-12-06 14:46:51 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-15 08:35:33 -07:00
										 |  |  | load("@io_bazel_rules_webtesting//web/versioned:browsers-0.3.2.bzl", "browser_repositories") | 
					
						
							| 
									
										
										
										
											2019-02-13 09:33:48 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-15 08:35:33 -07:00
										 |  |  | browser_repositories( | 
					
						
							|  |  |  |     chromium = True, | 
					
						
							|  |  |  |     firefox = True, | 
					
						
							|  |  |  | ) | 
					
						
							| 
									
										
										
										
											2018-05-29 15:35:48 -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") | 
					
						
							| 
									
										
										
										
											2017-12-06 06:56:49 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-22 09:36:47 -08:00
										 |  |  | ts_setup_workspace() | 
					
						
							| 
									
										
										
										
											2017-12-06 06:56:49 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | # Setup the rules_sass toolchain | 
					
						
							| 
									
										
										
										
											2018-06-04 10:45:27 -07:00
										 |  |  | load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories") | 
					
						
							| 
									
										
										
										
											2018-05-29 15:35:48 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | sass_repositories() |