-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle.kts
95 lines (75 loc) · 1.89 KB
/
build.gradle.kts
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
plugins {
base
java
idea
`maven-publish`
alias(libs.plugins.fabric.loom)
alias(libs.plugins.modpublisher)
}
val display = libs.versions.display
group = libs.versions.maven.group.get()
version = "${libs.versions.mod.get()}-${libs.versions.loader.get()}.${libs.versions.minecraft.get()}"
base {
archivesName.set(libs.versions.archives.name)
}
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
maven { url = uri("https://api.modrinth.com/maven") }
}
dependencies {
minecraft(libs.minecraft)
mappings(libs.yarn) { artifact { classifier = "v2" } }
modImplementation(libs.bundles.fabric)
modCompileOnly(libs.splasher)
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
withSourcesJar()
}
tasks {
processResources {
filesMatching("fabric.mod.json") {
expand(mapOf(
"version" to libs.versions.mod.get(),
"display" to display
))
}
}
jar {
from("LICENSE")
}
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
}
}
repositories {
}
}
publisher {
apiKeys {
modrinth(System.getenv("MODRINTH_TOKEN"))
curseforge(System.getenv("CURSEFORGE_TOKEN"))
}
modrinthID.set(libs.versions.id.modrinth)
curseID.set(libs.versions.id.curseforge)
versionType.set("release")
projectVersion.set(project.version.toString())
gameVersions.set(listOf("1.21"))
loaders.set(listOf("fabric", "quilt"))
curseEnvironment.set("client")
modrinthDepends.required("fabric-api")
modrinthDepends.optional("splasher")
modrinthDepends.embedded()
curseDepends.required("fabric-api")
curseDepends.optional("splasher")
curseDepends.embedded()
displayName.set("${display.name.get()} ${libs.versions.mod.get()} for ${display.loader.get()} ${display.version.get()}")
artifact.set(tasks.remapJar)
addAdditionalFile(tasks.remapSourcesJar)
changelog.set(file("CHANGELOG.md"))
}