generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
68 lines (55 loc) · 1.61 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
plugins {
id("fabric-loom") version "1.6-SNAPSHOT"
id("maven-publish")
}
java.sourceCompatibility = JavaVersion.VERSION_21
java.targetCompatibility = JavaVersion.VERSION_21
version = properties["mod_version"] as String
group = properties["maven_group"] as String
base.archivesName = "BetterAddServer-${properties["minecraft_version"]}-fabric"
repositories {
}
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter:5.7.1")
// To change the versions see the gradle.properties file
minecraft("com.mojang:minecraft:${project.properties["minecraft_version"]}")
mappings(loom.officialMojangMappings())
modImplementation("net.fabricmc:fabric-loader:${project.properties["loader_version"]}")
}
tasks {
processResources {
inputs.property("version", project.version)
filesMatching("fabric.mod.json") {
expand("version" to project.version)
}
filesMatching("META-INF/neoforge.mods.toml") {
expand("version" to project.version)
}
}
test {
useJUnitPlatform()
}
withType<JavaCompile> {
options.release.set(java.targetCompatibility.majorVersion.toInt())
}
java {
withSourcesJar()
}
jar {
from("LICENSE") {
rename { "${it}_${base.archivesName.get()}" }
}
}
}
loom {
runs {
named("client") {
client()
configName = "Fabric Client"
ideConfigGenerated(true)
runDir("run")
}
}
@Suppress("UnstableApiUsage")
mixin { defaultRefmapName.set("betteraddserver-fabric.refmap.json") }
}