-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMODULE.bazel
More file actions
60 lines (52 loc) · 2.05 KB
/
Copy pathMODULE.bazel
File metadata and controls
60 lines (52 loc) · 2.05 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
"""Minecraft 数据包构建系统的 Bazel 模块配置。
此模块定义了用于构建 Minecraft 数据包的 Bazel 模块配置。
主要功能包括:
- 配置构建系统的依赖项(Skylib、Pkg、Java 等)
- 管理 Maven 依赖项(Jackson、Enjoy 模板引擎等)
- 配置 Minecraft JAR 文件下载
- 集成第三方库(UniF-Logger)
提供完整的构建环境配置,支持数据包的编译、打包和部署。
"""
module(
name = "datapack",
version = "0.0.1",
)
bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "rules_pkg", version = "1.1.0")
bazel_dep(name = "rules_java", version = "8.16.1")
bazel_dep(name = "rules_jvm_external", version = "6.8")
bazel_dep(name = "rules_shell", version = "0.6.1")
bazel_dep(name = "platforms", version = "1.0.0")
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
artifacts = [
"com.fasterxml.jackson.core:jackson-core:2.9.6",
"com.fasterxml.jackson.core:jackson-annotations:2.9.6",
"com.fasterxml.jackson.core:jackson-databind:2.9.6",
"de.swiesend:secret-service:2.0.1-alpha",
"ch.qos.logback:logback-classic:1.5.18",
"com.github.mizosoft.methanol:methanol:1.8.3",
"net.java.dev.jna:jna:5.18.0",
"net.java.dev.jna:jna-platform:5.18.0",
],
fetch_sources = True,
lock_file = "//:maven_install.json",
)
use_repo(maven, "maven")
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "unif-logger",
build_file = "@//third_party/unif-logger:BUILD.unif-logger.bazel",
patch_strip = 1,
patches = [
"@//third_party/unif-logger/patches:license.patch",
],
sha256 = "c65e360caa1bef72801df7026ec0abe4a6a4718fc2a9f7f359ec60563b97d4b2",
url = "https://cdn.modrinth.com/data/ATVC2dJr/versions/qESWh4KO/UniF-Logger-1.0.0.zip",
)
minecraft = use_extension("//repo:minecraft_jar.bzl", "minecraft")
minecraft.minecraft_jar(
type = "server",
version = "1.21.10",
)
use_repo(minecraft, "minecraft")