Skip to content

Commit 6446da7

Browse files
committed
Use a libs.versions.toml
1 parent eac2895 commit 6446da7

File tree

2 files changed

+22
-16
lines changed

2 files changed

+22
-16
lines changed

build.gradle.kts

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ toolkitLoomHelper {
5454
}
5555

5656
dependencies {
57+
implementation(libs.discord.game.sdk4j)
58+
includeOrShade(libs.discord.game.sdk4j)
59+
60+
implementation(libs.bundles.ktor.client)
61+
includeOrShade(libs.bundles.ktor.client)
62+
implementation(libs.bundles.ktor.serialization)
63+
includeOrShade(libs.bundles.ktor.serialization)
64+
5765
// Add (Legacy) Fabric API as dependencies (these are both optional but are particularly useful).
5866
if (mcData.isFabric) {
5967
if (mcData.isLegacyFabric) {
@@ -64,20 +72,4 @@ dependencies {
6472
modImplementation("net.fabricmc.fabric-api:fabric-api:${mcData.dependencies.fabric.fabricApiVersion}")
6573
}
6674
}
67-
modImplementation("com.github.JnCrMx:discord-game-sdk4j:v0.5.5")
68-
69-
implementation("io.ktor:ktor-client-core:3.3.1")
70-
shade("io.ktor:ktor-client-core:3.3.1")
71-
implementation("io.ktor:ktor-client-cio:3.3.1")
72-
shade("io.ktor:ktor-client-cio:3.3.1")
73-
implementation("io.ktor:ktor-client-content-negotiation:3.3.1")
74-
shade("io.ktor:ktor-client-content-negotiation:3.3.1")
75-
implementation("io.ktor:ktor-serialization-kotlinx-json:3.3.1")
76-
shade("io.ktor:ktor-serialization-kotlinx-json:3.3.1")
77-
}
78-
79-
tasks {
80-
named("build") {
81-
dependsOn("fatJar")
82-
}
8375
}

gradle/libs.versions.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[versions]
2+
discord-game-sdk4j = "v0.5.5"
3+
ktor = "3.3.1"
4+
5+
[libraries]
6+
discord-game-sdk4j = { group = "com.github.JnCrMx", name = "discord-game-sdk4j", version.ref = "discord-game-sdk4j" }
7+
ktor-client-core = { group = "io.ktor", name = "ktor-client-core", version.ref = "ktor" }
8+
ktor-client-cio = { group = "io.ktor", name = "ktor-client-cio", version.ref = "ktor" }
9+
ktor-client-content-negotiation = { group = "io.ktor", name = "ktor-client-content-negotiation", version.ref = "ktor" }
10+
ktor-serialization-kotlinx-json = { group = "io.ktor", name = "ktor-serialization-kotlinx-json", version.ref = "ktor" }
11+
12+
[bundles]
13+
ktor-client = ["ktor-client-core", "ktor-client-cio", "ktor-client-content-negotiation"]
14+
ktor-serialization = ["ktor-serialization-kotlinx-json"]

0 commit comments

Comments
 (0)