-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.gradle
82 lines (71 loc) · 2.62 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
plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'fabric-loom' version '1.6-SNAPSHOT'
id "com.modrinth.minotaur" version "2.+"
}
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
archivesBaseName = project.archives_base_name
project.build_num = System.getenv("GITHUB_RUN_NUMBER") ?: "SNAPSHOT"
version = project.minecraft_version + "-" + project.build_num
group = project.maven_group
repositories {
maven {
url = "https://maven.terraformersmc.com/"
}
maven {
url = 'https://maven.parchmentmc.org'
}
mavenCentral()
}
dependencies {
minecraft("com.mojang:minecraft:${project.minecraft_version}")
mappings loom.layered() {
officialMojangMappings()
//parchment("org.parchmentmc.data:parchment-${minecraft_version}:${project.parchment_version}@zip") // TODO: update when available
}
modImplementation("net.fabricmc:fabric-loader:${project.loader_version}")
modImplementation("net.fabricmc.fabric-api:fabric-api:${project.fabric_version}")
modImplementation("com.terraformersmc:modmenu:${project.modmenu_version}")
// this is dumb as hell. bloats jar way too much. todo: switch to a different config provider
include(modImplementation("org.spongepowered:configurate-hocon:${project.configurate_version}"))
include("org.spongepowered:configurate-core:${project.configurate_version}")
include("com.google.guava:guava:31.1-jre")
include("com.typesafe:config:1.4.2")
include("io.leangen.geantyref:geantyref:1.3.12")
}
processResources {
inputs.property "version", project.version
inputs.property "minecraft_version", project.properties["minecraft_version"]
inputs.property "loader_version", project.properties["loader_version"]
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release.set(21)
}
jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}" }
}
}
loom {
mixin.defaultRefmapName = "purpurclient.refmap.json"
accessWidenerPath = file("src/main/resources/purpurclient.accesswidener")
}
modrinth {
token = System.getenv("MODRINTH_TOKEN")
projectId = "purpurclient"
versionName = project.minecraft_version + " build " + project.build_num
versionNumber = project.version
versionType = "release"
uploadFile = remapJar
gameVersions = [project.minecraft_version]
loaders = ["fabric"]
dependencies {
required.project "fabric-api"
}
changelog = System.getenv("COMMIT_MESSAGE")
}