-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathbuild.gradle.kts
115 lines (100 loc) · 3 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
plugins {
val jvmVersion = libs.versions.fabric.kotlin.get()
.split("+kotlin.")[1]
.split("+")[0]
kotlin("jvm").version(jvmVersion)
kotlin("plugin.serialization").version(jvmVersion)
alias(libs.plugins.fabric.loom)
alias(libs.plugins.mod.publish)
`maven-publish`
java
}
repositories {
mavenLocal()
mavenCentral()
maven("https://maven.parchmentmc.org/")
maven("https://maven.terraformersmc.com/")
maven("https://maven.isxander.dev/releases")
maven("https://maven.supersanta.me/snapshots")
maven("https://jitpack.io")
}
val modVersion = "2.0.0-beta.3"
val releaseVersion = "${modVersion}+${libs.versions.minecraft.get()}"
version = releaseVersion
group = "me.senseiwells"
dependencies {
minecraft(libs.minecraft)
@Suppress("UnstableApiUsage")
mappings(loom.layered {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-${libs.versions.parchment.get()}@zip")
})
modImplementation(libs.fabric.loader)
modImplementation(libs.fabric.api)
modImplementation(libs.fabric.kotlin)
modImplementation(libs.mod.menu)
modImplementation(libs.yacl)
include(modImplementation(libs.keybinds.get())!!)
modCompileOnly(libs.carpet)
modCompileOnly(libs.chunk.debug)
}
java {
withSourcesJar()
}
tasks {
processResources {
inputs.property("version", project.version)
filesMatching("fabric.mod.json") {
expand(mutableMapOf(
"version" to project.version,
"minecraft_dependency" to libs.versions.minecraft.get().replaceAfterLast('.', "x"),
"yacl_dependency" to libs.versions.yacl.get(),
"fabric_loader_dependency" to libs.versions.fabric.loader.get(),
))
}
}
jar {
from("LICENSE")
}
publishMods {
file = remapJar.get().archiveFile
changelog = """
Added `Custom Time Out` config which lets you set how long until your
client times out your connection to the server while it hangs.
""".trimIndent()
type = BETA
modLoaders.add("fabric")
displayName = "EssentialClient $modVersion for ${libs.versions.minecraft.get()}"
version = releaseVersion
modrinth {
accessToken = providers.environmentVariable("MODRINTH_API_KEY")
projectId = "sH0dfrKf"
minecraftVersions.add(libs.versions.minecraft)
requires {
id = "P7dR8mSH"
}
requires {
id = "Ha28R6CL"
}
requires {
id = "1eAoo2KR"
}
optional {
id = "zQxjhDPq"
}
optional {
id = "TQTTVgYE"
}
optional {
id = "mOgUt4GM"
}
}
}
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(project.components.getByName("java"))
}
}
}