-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathMODULE.bazel
239 lines (203 loc) · 8.01 KB
/
MODULE.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
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
module(
name = "player",
version = "1.0",
)
bazel_dep(name = "rules_player")
archive_override(
module_name = "rules_player",
strip_prefix = "rules_player-1.1.5",
urls = ["https://github.com/player-ui/rules_player/archive/refs/tags/v1.1.5.tar.gz"],
integrity = "sha256-sotB/beOkcn7FD+NurO6Uqi2OoKbbXHd7ya4ZO9nBCg="
)
# local_path_override(module_name = "rules_player", path = "../rules_player")
bazel_dep(name = "aspect_bazel_lib", version = "2.8.0")
bazel_dep(name = "aspect_rules_js", version = "2.0.0")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_pkg", version = "1.0.1")
bazel_dep(name = "aspect_rules_ts", version = "3.0.0")
# C++
bazel_dep(name = "rules_foreign_cc", version = "0.11.1")
bazel_dep(name = "googletest", version = "1.14.0")
####### Node.js version #########
bazel_dep(name = "rules_nodejs", version = "6.2.0")
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
node.toolchain(node_version = "20.14.0")
#################################
###### Start iOS ######
## Rule Dependencies
bazel_dep(name = "rules_apple", version = "3.5.1", repo_name = "build_bazel_rules_apple")
bazel_dep(name = "rules_ios", version = "4.8.2", repo_name = "build_bazel_rules_ios")
bazel_dep(name = "rules_xcodeproj", version = "2.2.0")
bazel_dep(name = "gazelle", version = "0.34.0", repo_name = "bazel_gazelle")
bazel_dep(name = "rules_swift_package_manager", version = "0.22.0")
bazel_dep(name = "swiftlint", version = "0.54.0", repo_name = "SwiftLint")
## This section is handled by rules_swift_package_manager
swift_deps = use_extension(
"@rules_swift_package_manager//:extensions.bzl",
"swift_deps",
)
swift_deps.from_file(
deps_index = "//:swift_deps_index.json",
)
## SPM Dependencies
### need to be listed here to be available as a target in BUILD files
### Add dependency in xcode/Package.swift and then run `bazel run //:update_swift_pkgs`
### before adding it here
use_repo(
swift_deps,
"swiftpkg_swift_hooks",
"swiftpkg_swiftlint",
"swiftpkg_viewinspector",
)
###### End iOS ######
npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
npm.npm_translate_lock(
name = "npm",
data = [
"//:package.json",
"//:patches/@[email protected]",
],
npmrc = "//:.npmrc",
pnpm_lock = "//:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
npm_package_target_name = "{dirname}"
)
use_repo(npm, "npm")
rules_ts_ext = use_extension(
"@aspect_rules_ts//ts:extensions.bzl",
"ext",
dev_dependency = True,
)
rules_ts_ext.deps()
use_repo(rules_ts_ext, "npm_typescript")
# Kotlin
bazel_dep(name = "rules_kotlin", version = "1.9.1")
single_version_override(
module_name = "rules_kotlin",
patches = ["//patches:rules_kotlin.context_receivers.patch"],
)
# TODO: Custom compiler version breaks embedded jdeps generator plugin - enable when removing custom kotlinc (see .bazelrc jvm_emit_jdeps)
rules_kotlin_extensions = use_extension(
"@rules_kotlin//src/main/starlark/core/repositories:bzlmod_setup.bzl",
"rules_kotlin_extensions",
)
rules_kotlin_extensions.kotlinc_version(
sha256 = "9db4b467743c1aea8a21c08e1c286bc2aeb93f14c7ba2037dbd8f48adc357d83",
version = "1.7.22",
)
use_repo(
rules_kotlin_extensions,
"com_github_jetbrains_kotlin",
)
register_toolchains("//jvm:kotlin_toolchain")
# Android
bazel_dep(name = "rules_android", version = "0.1.1")
bazel_dep(name = "rules_android_ndk")
git_override(
module_name = "rules_android_ndk",
commit = "d5c9d46a471e8fcd80e7ec5521b78bb2df48f4e0",
remote = "https://github.com/bazelbuild/rules_android_ndk",
)
android_ndk_repository_extension = use_extension("@rules_android_ndk//:extension.bzl", "android_ndk_repository_extension")
use_repo(android_ndk_repository_extension, "androidndk")
register_toolchains("@androidndk//:all")
remote_android_extensions = use_extension("@bazel_tools//tools/android:android_extensions.bzl", "remote_android_tools_extensions")
use_repo(remote_android_extensions, "android_gmaven_r8")
# Maven
bazel_dep(name = "rules_jvm_external")
git_override(
module_name = "rules_jvm_external",
commit = "73b63ba801f14d1bde7807994cc8c15db226ceec",
remote = "https://github.com/sugarmanz/rules_jvm_external.git",
)
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
artifacts = [
"org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0",
"org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.0",
"org.jetbrains.kotlin:kotlin-reflect:1.7.10",
"com.intuit.hooks:hooks:0.15.0",
# Testing
"io.mockk:mockk:1.12.0",
"org.amshove.kluent:kluent:1.68",
"org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.0",
# Android
"androidx.databinding:viewbinding:7.2.2",
"androidx.annotation:annotation:1.1.0",
# Android Demo
"androidx.navigation:navigation-runtime:2.3.3",
"androidx.navigation:navigation-ui-ktx:2.3.3",
"androidx.navigation:navigation-fragment-ktx:2.3.3",
"com.afollestad.material-dialogs:core:3.3.0",
"com.google.android.material:material:1.4.0",
# Android Demo Testing
"androidx.test.espresso:espresso-intents:3.3.0",
"androidx.test.ext:junit-ktx:1.1.3",
# Reference Assets Testing
"androidx.test:core:1.3.0",
"androidx.test:runner:1.3.0",
"org.robolectric:robolectric:4.11.1",
# Android Player
"androidx.core:core-ktx:1.6.0",
"androidx.appcompat:appcompat:1.3.0",
"androidx.transition:transition:1.4.1",
"androidx.lifecycle:lifecycle-runtime-ktx:2.4.0",
"androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0",
"androidx.constraintlayout:constraintlayout:2.1.4",
# AndroidX Resolutions
"androidx.activity:activity-ktx:1.2.3",
"androidx.fragment:fragment-ktx:1.3.4",
# Graal
"org.graalvm.js:js:21.2.0",
"org.graalvm.js:js-scriptengine:21.2.0",
"org.graalvm.sdk:graal-sdk:21.2.0",
# J2V8
"com.eclipsesource.j2v8:j2v8:aar:6.1.0",
"com.github.AlexTrotsenko:j2v8-debugger:0.2.3",
"com.facebook.stetho:stetho:1.5.1",
# Hermes
"com.facebook.fbjni:fbjni-java-only:0.6.0",
"com.facebook.fbjni:fbjni:0.6.0",
"com.facebook.soloader:soloader:0.11.0",
# Test utils
"org.junit.jupiter:junit-jupiter-api:5.6.0",
# Perf
"org.openjdk.jmh:jmh-core:1.21",
"org.openjdk.jmh:jmh-generator-annprocess:1.21",
# Distribution
"com.eclipsesource.minimal-json:minimal-json:0.9.5",
"com.electronwill.night-config:core:3.6.5",
"com.electronwill.night-config:toml:3.6.5",
"com.google.http-client:google-http-client:1.34.2",
"info.picocli:picocli:4.3.2",
"org.apache.commons:commons-compress:1.21",
"org.zeroturnaround:zt-exec:1.10",
"com.github.ajalt.clikt:clikt-jvm:3.4.0",
"io.github.gradle-nexus:publish-plugin:1.1.0",
"ch.qos.logback:logback-classic:1.2.11",
# slf4j
"org.slf4j:slf4j-api:1.7.36",
"ch.qos.logback:logback-classic:1.2.10",
# Junit5
"org.junit.platform:junit-platform-commons:1.7.2",
"org.junit.platform:junit-platform-console:1.7.2",
"org.junit.platform:junit-platform-engine:1.7.2",
"org.junit.platform:junit-platform-launcher:1.7.2",
"org.junit.platform:junit-platform-suite-api:1.7.2",
"org.apiguardian:apiguardian-api:1.0.0",
"org.opentest4j:opentest4j:1.1.1",
"org.junit.jupiter:junit-jupiter-api:5.6.0",
"org.junit.jupiter:junit-jupiter-engine:5.6.0",
"org.junit.jupiter:junit-jupiter-params:5.6.0",
],
fetch_sources = True,
repositories = [
"https://repo1.maven.org/maven2",
"https://maven.google.com/",
"https://plugins.gradle.org/m2/",
"https://jcenter.bintray.com/",
"https://jitpack.io/",
],
)
use_repo(maven, "maven")
bazel_dep(name = "rules_robolectric", version = "4.11.1")