-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathBUILD.bazel
67 lines (62 loc) · 2.15 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
load("@buildifier_prebuilt//:rules.bzl", "buildifier")
load("@gazelle//:def.bzl", "gazelle")
load("@rules_go//go:def.bzl", "go_library")
load("@bazel_env.bzl", "bazel_env")
# gazelle:prefix github.com/woven-planet/go-zserio
# gazelle:exclude example/**
# gazelle:exclude **/*_gen.zs.go
#
# For generated zserio libraries:
# gazelle:resolve go gen/github.com/woven-planet/go-zserio/testdata/reference_modules/core/instantiations //testdata/reference_modules:go_core_instantiations
# gazelle:resolve go gen/github.com/woven-planet/go-zserio/testdata/reference_modules/core/types //testdata/reference_modules:go_core_types
# gazelle:resolve go gen/github.com/woven-planet/go-zserio/testdata/reference_modules/testobject1/testobject //testdata/reference_modules:go_testobject
gazelle(name = "gazelle")
gazelle(
name = "gazelle-update-repos",
args = [
"-from_file=go.mod",
"-to_macro=third_party/go/repositories.bzl%go_repositories",
"-prune",
],
command = "update-repos",
)
buildifier(
name = "buildifier",
exclude_patterns = [
"./.git/*",
],
lint_mode = "warn",
lint_warnings = ["all"],
)
go_library(
name = "go-zserio",
srcs = [
"doc.go",
"iface.go",
"marshal.go",
"packing_context_node.go",
],
importpath = "github.com/woven-planet/go-zserio",
visibility = ["//visibility:public"],
deps = ["//zstream"],
)
# This is to ensure that common CLI tools are added to the PATH when using direnv.
bazel_env(
name = "bazel_env",
toolchains = {
"jdk": "@rules_java//toolchains:current_host_java_runtime",
"python": "@rules_python//python:current_py_toolchain",
},
tools = {
# Tools can be provided either as labels or via special make vars that
# are provided by the toolchains.
"buildifier": "@buildifier_prebuilt//:buildifier",
"buildozer": "@buildifier_prebuilt//:buildozer",
"gazelle": "//:gazelle",
"go": "@rules_go//go",
"gopackagesdriver.sh": "@rules_go//go/tools/gopackagesdriver",
"jar": "$(JAVABASE)/bin/jar",
"java": "$(JAVA)",
"python": "$(PYTHON3)",
},
)