-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
68 lines (57 loc) · 1.96 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
plugins {
id 'fabric-loom' version '1.9-SNAPSHOT'
// Check version: https://maven.firstdark.dev/#/releases/com/hypherionmc/modutils/modpublisher
id "com.hypherionmc.modutils.modpublisher" version "2.1.+"
}
dependencies {
// Change these versions in gradle.properties
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
minecraft "com.mojang:minecraft:${project.minecraft_version}"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
}
processResources {
filteringCharset "UTF-8"
filesMatching("*.mod.json") {
expand "version": project.mod_version
}
}
def targetJavaVersion = 17
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
it.options.release = targetJavaVersion
}
}
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
archivesBaseName = "${project.archives_base_name}-mc${project.minecraft_version}"
withSourcesJar()
}
publisher {
apiKeys {
modrinth System.getenv("MODRINTH_TOKEN")
curseforge System.getenv("CURSEFORGE_TOKEN")
github System.getenv("GITHUB_TOKEN")
}
setDebug(true)
changelog = "Update to `1.21.4`"
setCurseID("611998")
setModrinthID("of7wIinq")
setDisplayName("SnowyLeavesPlus ${project.mod_version} for Minecraft ${project.minecraft_version}")
setVersion("${project.mod_version}-mc${project.minecraft_version}")
setVersionType("beta")
setLoaders("fabric", "quilt")
setGameVersions("1.21.4")
setArtifact(remapJar)
addAdditionalFile(remapSourcesJar)
modrinthDepends {
required 'fabric-api'
}
curseDepends {
required 'fabric-api'
}
}