The Go library in this directory provides an extension to the Gazelle build file generator. This can be used in lieu of the razel R script for generating BUILD files for individual packages in your repo.
r_repository
and r_repository_list
continue to use razel for generating
BUILD files as the Gazelle extension is tuned more towards the end user.
Please see the Extending Gazelle guide on how to integrate this with your Gazelle binary.
When integrated, the Gazelle binary will have additional flags that will control the global behavior for this extension. These flags are:
Flags | |
---|---|
r_generate_rules |
Enable rule generation for R language. |
r_external_dep_prefix |
Prefix to append to repo names of external packages. |
r_add_test_rules |
Whether to add r_unit_test and r_pkg_test rules. |
r_installed_pkgs |
R packages that are to be assumed installed on the build machine (comma-separated). |
r_srcs_use_globs |
Whether to use glob expressions for the srcs attribute. |
r_roclets |
The roclets to run for building the source archive (comma-separated). |
r_roclets_deps |
Additional dependencies for running roclets (comma-separated). |
r_roclets_include_pkg_deps |
Whether to also include pkg deps when running roclets. |
r_delete_assignments |
(in `gazelle fix` mode only) Delete these variable assignments in the BUILD files (comma-separated). |
You can override the global behavior specified by the above flags, through gazelle directives in BUILD files. Any directive in a BUILD file will apply to that directory and all its subdirectories. The following directives are available:
r_generate_rules
r_external_dep_prefix
r_add_test_rules
r_srcs_use_globs
r_roclets
r_roclets_deps
r_roclets_include_pkg_deps