6dc8c42960
Future Bazel versions will discontinue support for native http rules and replace them with Skylark equivalents: [1]. Prepare the Gerit build tool chain for that move. The replacements depend on this PR in rules_closure project: [2], that wasn't merged yet. For now we can apply "patch on import", thanks Skylark's http rules patch support. When [2] is merged, and new version of rules_clsoure is released, we can remove the patching procedure. One side effect of this change is that Skylark version of http_file lost the ability to save the downloaded artifact under its real name and is using a generic download file name. The rule closure tool chain stumbles on this, and rejects to accept polymer_closure artifact without ".js" suffix. To rectify add intermediate rule and renamed "download" file to one with js suffix "polymer_closure_renamed.js": [3]. [1] https://groups.google.com/d/topic/bazel-discuss/dO2MHQLwJF0/discussion [2] https://github.com/bazelbuild/rules_closure/pull/270 [3] http://paste.openstack.org/show/722557 Inspired-By: "Klaus Aehlig" <aehlig@google.com> Feature: Issue 9151 Change-Id: I44ca2ecfea67d2f4434a4743e7a6f8a3645e96a8
34 lines
1.0 KiB
Python
34 lines
1.0 KiB
Python
# Copyright (C) 2017 The Android Open Source Project
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
package(
|
|
default_visibility = ["//visibility:public"],
|
|
)
|
|
|
|
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_library")
|
|
|
|
genrule(
|
|
name = "polymer_closure_renamed",
|
|
srcs = ["@polymer_closure//file"],
|
|
outs = ["polymer_closure_renamed.js"],
|
|
cmd = "cp $< $@",
|
|
)
|
|
|
|
closure_js_library(
|
|
name = "polymer_closure",
|
|
srcs = [":polymer_closure_renamed"],
|
|
data = ["//lib:LICENSE-Apache2.0"],
|
|
no_closure_library = True,
|
|
)
|