-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
88 lines (74 loc) · 2.56 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
import com.modrinth.minotaur.ModrinthExtension
import net.fabricmc.loom.api.LoomGradleExtensionAPI
plugins {
java
id("architectury-plugin") version "3.4.160"
id("dev.architectury.loom") version "1.9.420" apply false
id("com.modrinth.minotaur") version "2.8.7" apply false
}
operator fun Project.get(key: String) = properties[key] as String
architectury {
minecraft = rootProject["minecraft_version"]
}
version = rootProject["mod_version"]
subprojects {
apply(plugin = "dev.architectury.loom")
val loom = extensions.getByName("loom") as LoomGradleExtensionAPI
dependencies {
"minecraft"("com.mojang:minecraft:${rootProject["minecraft_version"]}")
@Suppress("UnstableApiUsage")
"mappings"(loom.layered {
officialMojangMappings {
nameSyntheticMembers = true
}
parchment("org.parchmentmc.data:parchment-1.21.4:2024.12.07@zip")
})
compileOnly("com.demonwav.mcdev:annotations:2.1.0")
}
if (name != "common") {
apply(plugin = "com.modrinth.minotaur")
extensions.configure<ModrinthExtension>("modrinth") {
token = if (rootProject.hasProperty("modrinthKey")) {
rootProject["modrinthKey"]
} else {
System.getenv("MODRINTH_TOKEN")
}
projectId = "bingo-mod"
val changelogFile = rootProject.file("changelogs/${rootProject.version}.md")
if (changelogFile.isFile) {
println("Setting changelog to file $changelogFile")
changelog = changelogFile.readText()
} else {
println("Changelog file $changelogFile doesn't exist!")
}
gameVersions.add(rootProject["minecraft_version"])
}
}
version = "${rootProject.version}+$name"
}
allprojects {
apply(plugin = "java")
apply(plugin = "architectury-plugin")
base.archivesName = rootProject["archives_base_name"]
group = rootProject["maven_group"]
repositories {
maven("https://maven.parchmentmc.org") {
name = "ParchmentMC"
}
maven("https://maven.shedaniel.me/")
maven("https://maven.blamejared.com/") {
name = "Jared's maven"
}
maven("https://maven.terraformersmc.com/releases/") {
name = "TerraformersMC"
}
maven("https://maven.neoforged.net/releases/")
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
options.release = 21
}
java {
withSourcesJar()
}
}