google-nomulus/java/google/registry/ui/soy/BUILD
lukes 7aa070b0a5 Change all foreach loops in Soy templates to use the for loop syntax
Soy supports 2 kinds of loops:
foreach- for iterating over items in a collection  e.g. {foreach $item in $list}...{/foreach}
for - for indexed iteration  e.g. {for $i in range(0, 10)}...{/for}

The reason Soy has 2 different loops is an accident of history, Soy didn’t use to have a proper grammar for expressions and so the alternate ‘for...range’ syntax was added to make it possible to write indexed loops.  As the grammar has improved having the two syntaxes is no longer necessary and so we are eliminating one of them.

As of 4a7373333f or mvn release "2018-01-03" the two forms are actually aliases for one another, so the only difference is the keyword (‘for’ vs ‘foreach’), and while the foreach loop is more popular the ‘for’ terminology is more standard so we are switching everything to that.

LSC: []
Tested:
    TAP sample presubmit queue
    []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=180942763
2018-01-19 14:14:31 -05:00

22 lines
692 B
Text

package(
default_visibility = ["//java/google/registry:registry_project"],
)
licenses(["notice"]) # Apache 2.0
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_java_template_library", "closure_js_template_library")
closure_js_template_library(
name = "soy",
srcs = glob(["*.soy"]),
globals = "//java/google/registry/ui:globals.txt",
# TODO: remove this when upgrading rules closure. This is only necessary because
# our version of soy is newer than what rules closure expects
should_generate_js_doc = False,
)
closure_java_template_library(
name = "soy_java_wrappers",
srcs = glob(["*.soy"]),
java_package = "google.registry.ui.soy",
)