-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.bazel
91 lines (80 loc) · 1.93 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@bazel_gazelle//:def.bzl", "gazelle")
package(
default_visibility = ["//visibility:public"],
)
gazelle(name = "gazelle")
proto_library(
name = "book_proto",
srcs = ["book.proto"],
)
go_proto_library(
name = "book_proto_go",
importpath = "ebooker/proto",
protos = [":book_proto"],
)
go_library(
name = "data",
srcs = ["data.go"],
importpath = "ebooker/data",
deps = [
":book_proto_go",
"@org_golang_google_protobuf//encoding/prototext:go_default_library",
],
)
go_library(
name = "downloader",
srcs = ["downloader.go"],
importpath = "ebooker/downloader",
deps = [
":book_proto_go",
":data",
":selector",
"@org_golang_google_protobuf//encoding/prototext:go_default_library",
],
)
go_test(
name = "downloader_test",
srcs = ["downloader_test.go"],
embed = [":downloader"],
deps = [
"@com_github_jarcoal_httpmock//:go_default_library",
],
)
go_library(
name = "selector",
srcs = ["selector.go"],
importpath = "ebooker/selector",
deps = [
":data",
"@com_github_google_go_cmp//cmp:go_default_library",
"@com_github_puerkitobio_goquery//:go_default_library",
],
)
go_test(
name = "selector_test",
srcs = ["selector_test.go"],
embed = [":selector"],
)
go_library(
name = "maker",
srcs = ["maker.go"],
importpath = "ebooker/maker",
deps = [
":data",
"@com_github_bmaupin_go_epub//:go_default_library",
],
)
go_binary(
name = "ebooker",
srcs = ["main.go"],
deps = [
":book_proto_go",
":data",
":downloader",
":maker",
"@org_golang_google_protobuf//encoding/prototext:go_default_library",
],
)