google-nomulus/java/google/registry/ui/BUILD
mcilwain 28f6c770c8 Add MOE equivalence for sync on 2016-12-19
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142449539
2017-01-09 11:59:04 -05:00

124 lines
3.9 KiB
Text

package(default_visibility = ["//java/google/registry:registry_project"])
licenses(["notice"]) # Apache 2.0
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_binary", "closure_js_deps")
load("//java/google/registry/builddefs:zip_file.bzl", "zip_file")
exports_files(["globals.txt"])
filegroup(
name = "runfiles",
srcs = glob(["assets/**"]) + [
"brain_bin.js",
"registrar_bin.js",
"//java/google/registry/ui/css:registrar_bin.css",
"//java/google/registry/ui/html:html_files",
],
)
filegroup(
name = "runfiles_debug",
srcs = [
":brain_bin",
":deps",
":registrar_bin",
":registrar_dbg",
"//java/google/registry/ui/css:registrar_dbg",
],
data = [":deps"],
)
zip_file(
name = "war",
srcs = [":runfiles"],
out = "ui.war",
mappings = {
"domain_registry/java/google/registry/ui/assets": "assets",
"domain_registry/java/google/registry/ui/css": "assets/css",
"domain_registry/java/google/registry/ui/html": "",
"domain_registry/java/google/registry/ui": "assets/js",
},
)
zip_file(
name = "war_debug",
srcs = [":runfiles_debug"],
out = "ui_debug.war",
data = [":runfiles_debug"],
mappings = {
"domain_registry/java/google/registry/ui/brain_bin.js.map": "assets/js/brain_bin.js.map",
"domain_registry/java/google/registry/ui/registrar_bin.js.map": "assets/js/registrar_bin.js.map",
"domain_registry/java/google/registry/ui/registrar_dbg.js": "assets/js/registrar_dbg.js",
"domain_registry/java/google/registry/ui/css/registrar_dbg.css": "assets/css/registrar_dbg.css",
"": "assets/sources",
},
deps = [":war"],
)
java_library(
name = "ui",
srcs = glob(["*.java"]),
visibility = ["//visibility:public"],
deps = [
"//java/google/registry/config",
"@com_google_appengine_api_1_0_sdk",
"@com_google_code_findbugs_jsr305",
"@com_google_dagger",
"@com_google_guava",
],
)
closure_js_deps(
name = "deps",
deps = ["//java/google/registry/ui/js/registrar"],
)
################################################################################
## Registrar Console
# This is the full-blown compiled JavaScript source code for the registrar
# console. Everything, including the soy templates, is compiled into a single
# .js file. The only symbols that will be available are the ones you @export.
# This will also replace calls to goog.getCssName() and {css ...} with their
# non-union minified equivalents.
closure_js_binary(
name = "registrar_bin",
css = "//java/google/registry/ui/css:registrar_bin",
entry_points = ["goog:registry.registrar.main"],
output_wrapper = "%output%//# sourceMappingURL=registrar_bin.js.map",
deps = [
"//java/google/registry/ui/externs",
"//java/google/registry/ui/js/registrar",
],
)
# This target creates a compiled JavaScript file where symbols are renamed to
# include dollar signs. This is useful for testing, because you can still read
# the source code, but it'll fail if your code is incorrect with regard to
# dotted and quoted properties. The same applies to CSS class names, which get
# an extra underscore.
closure_js_binary(
name = "registrar_dbg",
css = "//java/google/registry/ui/css:registrar_dbg",
debug = 1,
entry_points = ["goog:registry.registrar.main"],
formatting = "PRETTY_PRINT",
deps = [
"//java/google/registry/ui/externs",
"//java/google/registry/ui/js/registrar",
],
)
################################################################################
## Braintree Payment Method Frame (Brainframe)
closure_js_binary(
name = "brain_bin",
entry_points = ["goog:registry.registrar.BrainFrame.main"],
output_wrapper = "%output%//# sourceMappingURL=brain_bin.js.map",
deps = [
"//java/google/registry/ui/externs",
"//java/google/registry/ui/js/registrar",
],
)