-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathMODULE.bazel
More file actions
127 lines (107 loc) · 4.2 KB
/
MODULE.bazel
File metadata and controls
127 lines (107 loc) · 4.2 KB
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
module(
name = "ink",
version = "0.0.1",
)
git_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
#################################################################################
## Toolchain setup
#################################################################################
bazel_dep(name = "platforms", version = "0.0.11")
bazel_dep(name = "rules_cc", version = "0.2.2")
bazel_dep(name = "toolchains_llvm", version = "1.5.0")
# Configure and register the LLVM toolchain for host builds.
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm")
llvm.toolchain(llvm_version = "19.1.0")
use_repo(llvm, "llvm_toolchain")
register_toolchains("@llvm_toolchain//:all")
# Configure the Android NDK toolchain for NDK builds. Don't register that here so it's not required
# for builds that don't need it. Those configs can register those in --extra_toolchains.
bazel_dep(name = "rules_android_ndk", version = "0.1.3")
android_ndk_repository_extension = use_extension(
"@rules_android_ndk//:extension.bzl",
"android_ndk_repository_extension",
)
use_repo(android_ndk_repository_extension, "androidndk")
#################################################################################
## Direct dependencies
#################################################################################
bazel_dep(
name = "abseil-cpp",
version = "20250512.0",
repo_name = "com_google_absl",
)
bazel_dep(name = "bazel_skylib", version = "1.7.1")
git_repository(
name = "libtess2",
commit = "446bae6dfb4c3efb43cb2764379574dcb4f0ee6c", # Head as of 2025-04-25
remote = "https://github.com/memononen/libtess2.git",
)
bazel_dep(name = "protobuf", version = "31.1")
bazel_dep(name = "rules_android", version = "0.6.0")
bazel_dep(name = "rules_jni", version = "0.11.1")
bazel_dep(name = "rules_proto", version = "6.0.2")
git_repository(
name = "skia",
commit = "fb92a016ef1dd54b027d022e72689497eb5b6c0e", # Head as of 2025-09-08
remote = "https://github.com/google/skia.git",
)
# Skia configuration
local_repository = use_repo_rule(
"@bazel_tools//tools/build_defs/repo:local.bzl",
"local_repository",
)
local_repository(
name = "skia_user_config",
path = "skia_user_config",
)
#################################################################################
## Development dependencies
#################################################################################
bazel_dep(
name = "googletest",
version = "1.17.0",
dev_dependency = True,
repo_name = "com_google_googletest",
)
bazel_dep(
name = "google_benchmark",
version = "1.8.3",
dev_dependency = True,
repo_name = "com_google_benchmark",
)
bazel_dep(
name = "fuzztest",
version = "20250214.0",
dev_dependency = True,
repo_name = "com_google_fuzztest",
)
# Depend on a later version of Riegeli than the one in Fuzztest to avoid an
# incompatibility with the version of Abseil that we use. We don't use this
# directly, so it can be removed when we upgrade to a version of Fuzztest
# that depends on a later version (pending upgrade in
# https://github.com/google/fuzztest/pull/1742).
bazel_dep(
name = "riegeli",
version = "0.0.0-20250706-c4d1f27",
dev_dependency = True,
)
#################################################################################
## Transitive dependencies
#################################################################################
# We can remove these when Skia has a MODULE.bazel file.
# See: https://g-issues.skia.org/issues/367315534
bazel_dep(name = "rules_license", version = "1.0.0")
bazel_dep(name = "libpng", version = "1.6.47")