diff --git a/README.md b/README.md index 9514482753..07f6fa408c 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ notes. First you must [install Bazel]. Then you add the following to your `WORKSPACE` file: -```python +```starlark load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( @@ -90,9 +90,6 @@ rules_closure_toolchains() You are not required to install the Closure Tools, PhantomJS, or anything else for that matter; they will be fetched automatically by Bazel. -> :bangbang: Release 0.10.x will be the last to support loading dependencies though -> `closure_repositories()`. - ### Overriding Dependency Versions When you call `rules_closure_dependencies()` in your `WORKSPACE` file, it causes a @@ -104,7 +101,7 @@ To override the version of any dependency, modify your `WORKSPACE` file to pass custom dependency version. A full list of dependencies is available from [repositories.bzl]. For example, to override the version of Guava: -```python +```starlark load("@io_bazel_rules_closure//closure:repositories.bzl", "rules_closure_dependencies", "rules_closure_toolchains") rules_closure_dependencies( omit_com_google_guava=True, @@ -144,7 +141,7 @@ Please see the test directories within this project for concrete examples of usa ## closure\_js\_library -```python +```starlark load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_library") closure_js_library(name, srcs, data, deps, exports, suppress, convention, no_closure_library) @@ -245,7 +242,7 @@ This rule can be referenced as though it were the following: ## closure\_js\_binary -```python +```starlark load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_binary") closure_js_binary(name, deps, css, debug, language, entry_points, dependency_mode, compilation_level, formatting, @@ -367,7 +364,7 @@ When compiling AngularJS applications, you need to pass custom flags to the Closure Compiler. This can be accomplished by adding the following to your [closure_js_binary] rule: -```python +```starlark closure_js_binary( # ... defs = [ @@ -379,7 +376,7 @@ closure_js_binary( ## closure\_js\_test -```python +```starlark load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_test") closure_js_test(name, srcs, data, deps, css, html, language, suppress, compilation_level, entry_points, defs) @@ -452,7 +449,7 @@ This rule can be referenced as though it were the following: ## phantomjs\_test -```python +```starlark load("@io_bazel_rules_closure//closure:defs.bzl", "phantomjs_test") phantomjs_test(name, data, deps, html, harness, runner) ``` @@ -500,7 +497,7 @@ This rule can be referenced as though it were the following: ## closure\_js\_deps -```python +```starlark load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_deps") closure_js_deps(name, deps) ``` @@ -547,7 +544,7 @@ This rule can be referenced as though it were the following: ## closure\_js\_template\_library -```python +```starlark load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_template_library") closure_js_template_library(name, srcs, data, deps, globals, plugin_modules, should_generate_js_doc, @@ -634,7 +631,7 @@ This rule can be referenced as though it were the following: ## closure\_java\_template\_library -```python +```starlark load("@io_bazel_rules_closure//closure:defs.bzl", "closure_java_template_library") closure_java_template_library(name, srcs, data, deps, java_package) ``` @@ -699,7 +696,7 @@ TODO ## closure\_css\_library -```python +```starlark load("@io_bazel_rules_closure//closure:defs.bzl", "closure_css_library") closure_css_library(name, srcs, data, deps) ``` @@ -763,7 +760,7 @@ This rule can be referenced as though it were the following: ## closure\_css\_binary -```python +```starlark load("@io_bazel_rules_closure//closure:defs.bzl", "closure_css_binary") closure_css_binary(name, deps, renaming, debug, defs) ``` @@ -872,7 +869,7 @@ This rule can be referenced as though it were the following: ## closure\_js\_proto\_library -```python +```starlark load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_proto_library") closure_js_proto_library(name, srcs, add_require_for_enums, binary, import_style) @@ -929,7 +926,7 @@ This rule can be referenced as though it were the following: ## closure\_proto\_library -```python +```starlark load("@io_bazel_rules_closure//closure:defs.bzl", "closure_proto_library") closure_proto_library(name, deps) ``` diff --git a/closure/defs.bzl b/closure/defs.bzl index 037e1fcd07..2a8e31a938 100644 --- a/closure/defs.bzl +++ b/closure/defs.bzl @@ -28,7 +28,6 @@ load("//closure/templates:closure_templates_plugin.bzl", _closure_templates_plug load("//closure/testing:closure_js_test.bzl", _closure_js_test = "closure_js_test") load("//closure/testing:phantomjs_test.bzl", _phantomjs_test = "phantomjs_test") load("//closure:filegroup_external.bzl", _filegroup_external = "filegroup_external") -load("//closure:repositories.bzl", _closure_repositories = "closure_repositories") load("//closure:webfiles/web_library.bzl", _web_library = "web_library") load("//closure:webfiles/web_library_external.bzl", _web_library_external = "web_library_external") @@ -49,6 +48,5 @@ closure_templates_plugin = _closure_templates_plugin closure_js_test = _closure_js_test phantomjs_test = _phantomjs_test filegroup_external = _filegroup_external -closure_repositories = _closure_repositories # TODO(yannic): Remove on 2019-11-01. web_library = _web_library web_library_external = _web_library_external diff --git a/closure/repositories.bzl b/closure/repositories.bzl index 4599e253d3..a68b275a74 100644 --- a/closure/repositories.bzl +++ b/closure/repositories.bzl @@ -18,22 +18,6 @@ load("@bazel_tools//tools/build_defs/repo:java.bzl", "java_import_external") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file") load("//closure/private:platform_http_file.bzl", "platform_http_file") -_ERROR_CLOSURE_REPOSITORIES_IS_DEPRECATED = """ -closure_repositories() is deprecated. - -Please add the following to your workspace instead: - - load("@io_bazel_rules_closure//closure:repositories.bzl", "rules_closure_dependencies", "rules_closure_toolchains") - rules_closure_dependencies() - rules_closure_toolchains() -""".strip() - -def closure_repositories(**kargs): - """Legacy macro to import dependencies for Closure Rules.""" - - print(_ERROR_CLOSURE_REPOSITORIES_IS_DEPRECATED) - rules_closure_dependencies(**kargs) - def rules_closure_toolchains(): """An utility method to load all Closure toolchains. @@ -70,7 +54,6 @@ def rules_closure_dependencies( omit_com_google_javascript_closure_library = False, omit_com_google_jsinterop_annotations = False, omit_com_google_protobuf = False, - omit_com_google_protobuf_java = False, omit_com_google_protobuf_js = False, omit_com_google_template_soy = False, omit_com_google_template_soy_jssrc = False, @@ -98,8 +81,6 @@ def rules_closure_dependencies( omit_rules_python = False, omit_zlib = False): """Imports dependencies for Closure Rules.""" - if omit_com_google_protobuf_java: - fail("omit_com_google_protobuf_java no longer supported and must be not be passed to closure_repositories()") if not omit_aopalliance: aopalliance() if not omit_args4j: