Skip to content

Commit d9c65b0

Browse files
authored
Merge pull request #260 from Kouvali/refactor/fabric-dependencies
chore: optimize fabric dependencies
2 parents 46ba3d4 + 0df1354 commit d9c65b0

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ shadow = "9.3.1"
77
minotaur = "2.8.10"
88
hangarPublish = "0.1.4"
99

10+
fabric-api = "0.141.1+1.21.11"
11+
1012
cloud-bukkit = "2.0.0-beta.14"
1113
cloud-mod = "2.0.0-beta.15"
1214
cloud-core = "2.0.0"
@@ -25,7 +27,6 @@ adventure-option = "net.kyori:option:1.1.0"
2527
adventure-platform-bukkit = "net.kyori:adventure-platform-bukkit:4.4.1"
2628
adventure-platform-fabric = "net.kyori:adventure-platform-fabric:6.8.0"
2729

28-
fabric-api = "net.fabricmc.fabric-api:fabric-api:0.141.1+1.21.11"
2930
fabric-loader = "net.fabricmc:fabric-loader:0.18.4"
3031
fabric-language-kotlin = "net.fabricmc:fabric-language-kotlin:1.13.8+kotlin.2.3.0"
3132

@@ -67,7 +68,6 @@ minecraft = [
6768
]
6869

6970
fabric = [
70-
"fabric-api",
7171
"fabric-loader",
7272
"fabric-language-kotlin"
7373
]

platform/fabric/build.gradle.kts

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,19 @@ dependencies {
5252
api(project(":api")); include(project(":api"))
5353
api(project(":core")); include(project(":core"))
5454

55+
setOf(
56+
"fabric-api-base",
57+
"fabric-command-api-v2",
58+
"fabric-data-attachment-api-v1",
59+
"fabric-entity-events-v1",
60+
"fabric-events-interaction-v0",
61+
"fabric-lifecycle-events-v1",
62+
"fabric-networking-api-v1",
63+
"fabric-transitive-access-wideners-v1"
64+
).forEach {
65+
modImplementation(fabricApi.module(it, libs.versions.fabric.api.get()))
66+
}
67+
5568
modImplementation(libs.bundles.fabric)
5669

5770
api(libs.bundles.fabric.library); include(libs.bundles.fabric.library)
@@ -76,7 +89,16 @@ fabricModJson {
7689
depends = mapOf(
7790
"minecraft" to listOf("~${property("minecraft_version")}"),
7891
"fabricloader" to listOf("*"),
79-
"fabric-api" to listOf("*"),
92+
93+
// fabric-api
94+
"fabric-api-base" to listOf("*"),
95+
"fabric-command-api-v2" to listOf("*"),
96+
"fabric-data-attachment-api-v1" to listOf("*"),
97+
"fabric-entity-events-v1" to listOf("*"),
98+
"fabric-events-interaction-v0" to listOf("*"),
99+
"fabric-lifecycle-events-v1" to listOf("*"),
100+
"fabric-networking-api-v1" to listOf("*"),
101+
"fabric-transitive-access-wideners-v1" to listOf("*"),
80102

81103
// mod libraries
82104
"adventure-platform-fabric" to listOf("*"),

0 commit comments

Comments
 (0)