| 
									
										
										
										
											2017-12-06 06:56:49 -08:00
										 |  |  | workspace(name = "bazel_integration_test") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											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", | 
					
						
							| 
									
										
										
										
											2019-02-13 09:47:22 -08:00
										 |  |  |     sha256 = "1416d03823fed624b49a0abbd9979f7c63bbedfd37890ddecedd2fe25cccebc6", | 
					
						
							|  |  |  |     urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.18.6/rules_nodejs-0.18.6.tar.gz"], | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Fetch sass rules for compiling sass files | 
					
						
							|  |  |  | http_archive( | 
					
						
							|  |  |  |     name = "io_bazel_rules_sass", | 
					
						
							|  |  |  |     sha256 = "dbe9fb97d5a7833b2a733eebc78c9c1e3880f676ac8af16e58ccf2139cbcad03", | 
					
						
							|  |  |  |     strip_prefix = "rules_sass-1.11.0", | 
					
						
							|  |  |  |     url = "https://github.com/bazelbuild/rules_sass/archive/1.11.0.zip", | 
					
						
							|  |  |  | ) | 
					
						
							| 
									
										
										
										
											2018-06-25 11:22:23 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | # Fetch the angular repository since we build angular from source | 
					
						
							|  |  |  | # TODO(gregmagolan): use angular bundles in the Bazel build | 
					
						
							| 
									
										
										
										
											2018-06-25 11:22:23 -07:00
										 |  |  | local_repository( | 
					
						
							|  |  |  |     name = "angular", | 
					
						
							| 
									
										
										
										
											2018-08-21 01:37:09 -07:00
										 |  |  |     path = "../..", | 
					
						
							| 
									
										
										
										
											2018-06-25 11:22:23 -07:00
										 |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | # Fetch the rxjs repository since we build rxjs from source | 
					
						
							|  |  |  | # TODO(gregmagolan): use rxjs bundles in the Bazel build | 
					
						
							| 
									
										
										
										
											2018-10-16 13:20:00 -07:00
										 |  |  | http_archive( | 
					
						
							| 
									
										
										
										
											2018-06-25 11:22:23 -07:00
										 |  |  |     name = "rxjs", | 
					
						
							| 
									
										
										
										
											2018-10-16 13:20:00 -07:00
										 |  |  |     sha256 = "72b0b4e517f43358f554c125e40e39f67688cd2738a8998b4a266981ed32f403", | 
					
						
							| 
									
										
										
										
											2018-12-06 14:46:51 -08:00
										 |  |  |     strip_prefix = "package/src", | 
					
						
							|  |  |  |     url = "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.3.tgz", | 
					
						
							| 
									
										
										
										
											2018-06-25 11:22:23 -07:00
										 |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | # Check the bazel version and download npm dependencies | 
					
						
							| 
									
										
										
										
											2018-10-04 13:14:14 -07:00
										 |  |  | load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install") | 
					
						
							| 
									
										
										
										
											2018-05-29 15:35:48 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | # Bazel version must be at least v0.21.0 because: | 
					
						
							|  |  |  | #   - 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) | 
					
						
							|  |  |  | check_bazel_version("0.21.0", """
 | 
					
						
							|  |  |  | 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-04 15:53:32 -08:00
										 |  |  | """)
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Setup the Node.js toolchain | 
					
						
							| 
									
										
										
										
											2018-09-05 12:38:53 -07:00
										 |  |  | node_repositories( | 
					
						
							| 
									
										
										
										
											2018-09-11 18:11:32 -07:00
										 |  |  |     node_version = "10.9.0", | 
					
						
							| 
									
										
										
										
											2018-11-20 06:21:05 -08: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-02-04 16:47:57 -08:00
										 |  |  |     # Need a reference to @angular here so that Bazel sets up the | 
					
						
							|  |  |  |     # external repository before calling yarn_install | 
					
						
							|  |  |  |     data = ["@angular//:LICENSE"], | 
					
						
							| 
									
										
										
										
											2018-10-16 13:20:00 -07:00
										 |  |  |     package_json = "//src:package.json", | 
					
						
							|  |  |  |     yarn_lock = "//src: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() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Load karma dependencies | 
					
						
							|  |  |  | load("@build_bazel_rules_karma//:package.bzl", "rules_karma_dependencies") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | rules_karma_dependencies() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Setup the rules_webtesting toolchain | 
					
						
							| 
									
										
										
										
											2018-05-29 15:35:48 -07:00
										 |  |  | load("@io_bazel_rules_webtesting//web:repositories.bzl", "browser_repositories", "web_test_repositories") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | web_test_repositories() | 
					
						
							| 
									
										
										
										
											2018-12-06 14:46:51 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-29 15:35:48 -07:00
										 |  |  | browser_repositories( | 
					
						
							|  |  |  |     chromium = True, | 
					
						
							|  |  |  |     firefox = True, | 
					
						
							|  |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | # Setup the rules_typescript tooolchain | 
					
						
							| 
									
										
										
										
											2018-01-17 14:49:08 -08:00
										 |  |  | load("@build_bazel_rules_typescript//:defs.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() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-04 15:53:32 -08:00
										 |  |  | # Setup the angular toolchain | 
					
						
							| 
									
										
										
										
											2018-05-10 23:35:21 -07:00
										 |  |  | load("@angular//:index.bzl", "ng_setup_workspace") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ng_setup_workspace() |