Skip to content

Commit 52e955b

Browse files
Bump version (#98)
Fix release task
1 parent 1561a46 commit 52e955b

File tree

3 files changed

+28
-21
lines changed

3 files changed

+28
-21
lines changed

build.gradle.kts

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ plugins {
1717
}
1818

1919
var release = false
20+
val props = properties
2021

2122
val modId: String by project
2223
val modName: String by project
@@ -225,45 +226,46 @@ curseforge {
225226
mainArtifact(tasks["remapJar"])
226227

227228
relations(closureOf<CurseRelation> {
228-
requiredDependency("fabric-api")
229-
requiredDependency("fabric-language-kotlin")
229+
props["cfReqDeps"].toString().split(",").forEach {
230+
requiredDependency(it)
231+
}
230232
})
231233
})
232234

233235
options(closureOf<Options> {
234-
debug = true
235236
forgeGradleIntegration = false
236237
})
237238
}
238239
}
239240

241+
tasks {
242+
register<TaskModrinthUpload>("publishModrinth") {
243+
onlyIf { System.getenv().contains("MODRINTH_TOKEN") }
244+
dependsOn("build")
240245

241-
val modrinth = task<TaskModrinthUpload>("publishModrinth") {
242-
onlyIf { System.getenv().contains("MODRINTH_TOKEN") }
243-
244-
group = "upload"
246+
group = "upload"
245247

246-
token = System.getenv("MODRINTH_TOKEN")
248+
token = System.getenv("MODRINTH_TOKEN")
247249

248-
projectId = "dohojEfz"
249-
versionType = VersionType.RELEASE
250-
version = modVersion
251-
changelog = System.getenv("CHANGELOG")
250+
projectId = "LVN9ygNV"
251+
versionType = VersionType.RELEASE
252+
version = modVersion
253+
changelog = System.getenv("CHANGELOG")
252254

253-
addGameVersion(libs.versions.minecraft.get())
254-
addLoader("fabric")
255+
addGameVersion(libs.versions.minecraft.get())
256+
addLoader("fabric")
255257

256-
// FLK
257-
addDependency("Ha28R6CL", DependencyType.REQUIRED)
258-
// FAPI
259-
addDependency("P7dR8mSH", DependencyType.REQUIRED)
258+
props["mrReqDeps"].toString().split(",").forEach {
259+
addDependency(it, DependencyType.REQUIRED)
260+
}
260261

261-
uploadFile = tasks["remapJar"]
262+
uploadFile = remapJar.get().archiveFile.get()
263+
}
262264
}
263265

264266
tasks.register("release") {
265267
release = true
266-
dependsOn("curseforge", modrinth)
268+
dependsOn("curseforge", "publishModrinth")
267269
}
268270

269271
detekt {

gradle.properties

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ kotlin.code.style=official
22
org.gradle.jvmargs=-Xmx1G
33

44
# Mod Properties
5-
modVersion = 1.1.0
5+
modVersion = 1.1.1
66
mavenGroup = com.github.quiltservertools
77
modId = ledger
88
modName = Ledger
9+
10+
cfReqDeps = fabric-api,fabric-language-kotlin
11+
# FAPI, FLK
12+
mrReqDeps = c1p9mmFg,1qsZV7U7

libs.versions.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ fabric-api = "0.40.1+1.17"
77

88
# Kotlin
99
kotlin = "1.5.21"
10+
# Also modrinth version in gradle.properties
1011
fabric-kotlin = "1.6.3+kotlin.1.5.21"
1112

1213
fabric-permissions = "0.1-SNAPSHOT"

0 commit comments

Comments
 (0)