forked from JustS-js/CatTeleportMod-Fabric
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
135 lines (109 loc) · 3.95 KB
/
build.gradle
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
import com.hypherionmc.modpublisher.properties.ModLoader
plugins {
id("fabric-loom") version("1.7-SNAPSHOT")
id("maven-publish")
id("com.hypherionmc.modutils.modpublisher") version("2.1.6")
}
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group
repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
maven { url "https://maven.shedaniel.me/" }
maven { url "https://maven.terraformersmc.com/releases" }
maven { url "https://maven.fabricmc.net/" }
maven { url = "https://api.modrinth.com/maven" }
}
dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modApi("me.shedaniel.cloth:cloth-config-fabric:${clothconfig_version}") {
exclude(group: "net.fabricmc.fabric-api")
}
modImplementation "com.terraformersmc:modmenu:11.0.1"
implementation "javax.annotation:javax.annotation-api:1.3.2"
implementation 'com.google.code.findbugs:jsr305:3.0.2'
compileOnly 'org.projectlombok:lombok:1.18.34'
annotationProcessor 'org.projectlombok:lombok:1.18.34'
modImplementation "maven.modrinth:autoreconnectrf:TnGBOBXZ"
}
processResources {
def expandProps = [
"version": project.version,
"loader_version": loader_version,
"minecraft_version": minecraft_version,
"clothconfig_version": clothconfig_version
]
filesMatching("fabric.mod.json") {
expand expandProps
}
inputs.properties(expandProps)
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release = 21
}
jar {
from(rootProject.file("LICENSE")) {
rename { "${it}_${project.archivesBaseName}" }
}
manifest {
attributes([
"Specification-Title" : "CatTeleportMod",
"Specification-Vendor" : "MiTask",
"Specification-Version" : project.jar.archiveVersion,
"Implementation-Title" : project.name,
"Implementation-Version" : project.jar.archiveVersion,
"Implementation-Vendor" : "MiTask",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"Timestamp" : System.currentTimeMillis(),
"Built-On-Java" : "${System.getProperty('java.vm.version')} (${System.getProperty('java.vm.vendor')})",
"Built-On-Minecraft" : minecraft_version
])
}
}
publisher {
apiKeys {
modrinth System.getenv().MODRINTH_TOKEN
curseforge System.getenv().CURSEFORGE_TOKEN
github System.getenv().GITHUB_TOKEN
}
setDebug(true)
// setCurseID(curseforge_id)
setModrinthID(modrinth_id)
setVersionType(release_type)
setChangelog("https://raw.githubusercontent.com/MrMasrozYTLIVE/CatTeleportMod-Fabric/refs/heads/master/changelog.md")
setProjectVersion(mod_version)
setDisplayName("CatTeleportMod ${mod_version}")
setGameVersions(List.of(minecraft_versions.split(" ")))
setLoaders(ModLoader.FABRIC, ModLoader.QUILT)
setCurseEnvironment("client")
setArtifact(remapJar)
setDisableMalwareScanner(true)
setJavaVersions(List.of(JavaVersion.VERSION_21))
setDisableEmptyJarCheck(true)
github {
repo = "MrMasrozYTLIVE/CatTeleportMod-Fabric"
tag = "CatTeleportMod-${mod_version}"
target = "master"
draft = false
}
modrinthDepends {
required "fabric-api", "cloth-config"
optional 'modmenu'
}
curseDepends {
required "fabric-api", "cloth-config"
optional 'modmenu'
}
}