-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle.kts
102 lines (87 loc) · 2.51 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
@file:Suppress("UnstableApiUsage")
plugins {
alias(libs.plugins.fabric.loom)
}
version = "0.1.0"
group = "dev.denimred"
base {
archivesName = "simplemuseum"
}
loom {
splitEnvironmentSourceSets()
accessWidenerPath = file("src/main/resources/simplemuseum.accesswidener")
mods.register(base.archivesName.get()) {
sourceSet(sourceSets["main"])
sourceSet(sourceSets["client"])
}
log4jConfigs.from(file("./src/log4j.xml"))
runs.getByName("client") {
programArg("--username=DenimRed")
programArg("--uuid=2f6fe476323e4ede945e927a34d38fe9")
programArg("--width=1280")
programArg("--height=720")
}
}
fabricApi {
configureDataGeneration {
createSourceSet = true
strictValidation = true
}
}
repositories {
maven("https://maven.parchmentmc.net/") {
name = "ParchmentMC"
content { includeGroup(libs.parchment.orNull?.group!!) }
}
maven("https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/") {
name = "GeckoLib"
content {
includeGroupByRegex("software\\.bernie.*")
includeGroup("com.eliotlash.mclib")
}
}
maven("https://maven.terraformersmc.com/") { name = "TerraformersMC" }
exclusiveContent {
forRepository { maven("https://api.modrinth.com/maven") { name = "Modrinth" } }
filter { includeGroup("maven.modrinth") }
}
}
dependencies {
// Minecraft
minecraft(libs.minecraft)
mappings(loom.layered {
officialMojangMappings()
parchment(variantOf(libs.parchment) { artifactType("zip") })
})
// Fabric
modImplementation(libs.fabric.loader)
modImplementation(libs.fabric.api)
// GeckoLib
modImplementation(libs.geckolib)
implementation(libs.mclib)
// Misc
compileOnly(libs.jsr305) // JSR 305 is cringe but so am I, so it's okay
modRuntimeOnly(libs.modmenu)
modRuntimeOnly("maven.modrinth:jade:CciLEAMK") // ID instead of version since it uses the Forge release otherwise
}
java {
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
tasks {
processResources {
inputs.property("version", project.version)
filesMatching("fabric.mod.json") {
expand("version" to project.version)
}
}
withType<JavaCompile>().configureEach {
options.release = 17
}
jar {
from("LICENSE") {
rename { "${it}_${base.archivesName.get()}" }
}
}
}