-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
65 lines (52 loc) · 1.64 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
plugins {
java
id("fabric-loom") version "1.7-SNAPSHOT"
}
class ModInfo {
val id = property("mod.id").toString()
val group = property("mod.group").toString()
val version = property("mod.version").toString()
}
val mod = ModInfo()
val loaderVersion = property("deps.fabric_loader").toString()
fabricApi {
configureDataGeneration()
}
loom {
accessWidenerPath = file("src/main/resources/bombastic.accesswidener")
}
repositories {
maven("https://maven.terraformersmc.com/releases/")
maven("https://maven.callmeecho.dev/releases/")
}
dependencies {
minecraft("com.mojang:minecraft:${property("deps.minecraft")}")
mappings("net.fabricmc:yarn:${property("deps.yarn_mappings")}:v2")
modImplementation("net.fabricmc:fabric-loader:${loaderVersion}")
modImplementation("net.fabricmc.fabric-api:fabric-api:${property("deps.fabric_api")}")
fun specterModule(name: String) {
include("dev.spiritstudios.specter:specter-$name:${property("deps.specter")}")
modImplementation("dev.spiritstudios.specter:specter-$name:${property("deps.specter")}")
}
specterModule("api")
specterModule("core")
specterModule("config")
specterModule("item")
specterModule("block")
specterModule("registry")
specterModule("render")
}
tasks.processResources {
inputs.property("id", mod.id)
inputs.property("version", mod.version)
val map = mapOf(
"id" to mod.id,
"version" to mod.version
)
filesMatching("fabric.mod.json") { expand(map) }
}
java {
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}