generated from KessokuTeaTime/Example-Mod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
113 lines (90 loc) · 2.36 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
class Display {
lateinit var name: String
lateinit var loader: String
lateinit var version: String
}
var display: Display = Display()
plugins {
base
java
idea
`maven-publish`
alias(libs.plugins.fabric.loom)
alias(libs.plugins.modpublisher)
}
group = libs.versions.maven.group.get()
version = "${libs.versions.mod.get()}-${libs.versions.loader.get()}${libs.versions.minecraft.get()}"
display.name = libs.versions.display.name.get()
display.loader = libs.versions.display.loader.get()
display.version = libs.versions.display.version.get()
base {
archivesName.set(libs.versions.archives.name)
}
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
maven { url = uri("https://api.modrinth.com/maven") }
maven { url = uri("https://maven.shedaniel.me/") } // Cloth Config
maven { url = uri("https://maven.terraformersmc.com/releases/") } // Mod Menu
}
dependencies {
minecraft(libs.minecraft)
mappings(libs.yarn)
modImplementation(libs.bundles.fabric)
modApi(libs.cloth.config)
modApi(libs.modmenu)
modImplementation(libs.equator)
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withSourcesJar()
}
loom {
accessWidenerPath = file("src/main/resources/knowledges.accesswidener")
}
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.20.2", "1.20.3", "1.20.4"))
loaders.set(listOf("fabric", "quilt"))
curseEnvironment.set("both")
modrinthDepends.required("fabric-api")
modrinthDepends.optional()
modrinthDepends.embedded()
curseDepends.required("fabric-api")
curseDepends.optional()
curseDepends.embedded()
displayName.set("${display.name} ${libs.versions.mod.get()} for ${display.loader} ${display.version}")
artifact.set(tasks.remapJar)
addAdditionalFile(tasks.remapSourcesJar)
changelog.set(file("CHANGELOG.md"))
}