main
text 86 lines 2.49 KB
Raw
1 workspace(name = "tower-of-bazel")
2
3 load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
4
5 http_archive(
6 name = "rules_nodejs",
7 sha256 = "0c2277164b1752bb71ecfba3107f01c6a8fb02e4835a790914c71dfadcf646ba",
8 urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.8.5/rules_nodejs-core-5.8.5.tar.gz"],
9 )
10
11 http_archive(
12 name = "build_bazel_rules_nodejs",
13 sha256 = "a1295b168f183218bc88117cf00674bcd102498f294086ff58318f830dd9d9d1",
14 urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.8.5/rules_nodejs-5.8.5.tar.gz"],
15 )
16
17 load("@build_bazel_rules_nodejs//:repositories.bzl", "build_bazel_rules_nodejs_dependencies")
18
19 build_bazel_rules_nodejs_dependencies()
20
21 load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains")
22
23 node_version = "20.14.0"
24
25 nodejs_register_toolchains(
26 name = "nodejs",
27 node_version = node_version,
28 )
29
30 load("@build_bazel_rules_nodejs//:index.bzl", "npm_install")
31
32 npm_install(
33 name = "npm",
34 package_json = "//frontend/desktop:package.json",
35 package_lock_json = "//frontend/desktop:package-lock.json",
36 package_path = "frontend/desktop/",
37 quiet = False,
38 symlink_node_modules = True,
39 )
40
41 # Load the Ruby rules
42 load("@rules_ruby//ruby:deps.bzl", "rb_register_toolchains")
43
44 rb_register_toolchains(
45 version_file = "//backend/app:.ruby-version",
46 )
47
48 # Rulesets Android / Java / Kotlin
49
50 _KOTLIN_COMPILER_VERSION = "1.7.20"
51
52 _KOTLIN_COMPILER_SHA = "5e3c8d0f965410ff12e90d6f8dc5df2fc09fd595a684d514616851ce7e94ae7d"
53
54 ## Android
55
56 http_archive(
57 name = "build_bazel_rules_android",
58 sha256 = "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806",
59 strip_prefix = "rules_android-0.1.1",
60 urls = ["https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip"],
61 )
62
63 load("@build_bazel_rules_android//android:rules.bzl", "android_sdk_repository")
64
65 android_sdk_repository(name = "androidsdk")
66
67 ## Kotlin
68
69 http_archive(
70 name = "io_bazel_rules_kotlin",
71 sha256 = "15afe2d727f0dba572e0ce58f1dac20aec1441422ca65f7c3f7671b47fd483bf",
72 url = "https://github.com/bazelbuild/rules_kotlin/releases/download/v1.7.0/rules_kotlin_release.tgz",
73 )
74
75 load("@io_bazel_rules_kotlin//kotlin:repositories.bzl", "kotlin_repositories", "kotlinc_version")
76
77 kotlin_repositories(
78 compiler_release = kotlinc_version(
79 release = _KOTLIN_COMPILER_VERSION,
80 sha256 = _KOTLIN_COMPILER_SHA,
81 ),
82 )
83
84 load("@io_bazel_rules_kotlin//kotlin:core.bzl", "kt_register_toolchains")
85
86 kt_register_toolchains()