generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle.kts
77 lines (67 loc) · 2.7 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
@file:Suppress("PropertyName")
plugins {
id("java")
id("fabric-loom") version("1.7.+") apply(false)
}
val MOD_NAME by extra { "VanillaDisable" }
val MOD_DESCRIPTION by extra { "Allows you to disable a lot of vanilla features." }
val MOD_ID by extra { "vanilla_disable" }
val MOD_AUTHOR by extra { "DragonEggBedrockBreaking" }
val CREDITS by extra { "Wesley1808, FallenBreath, NoComment, LittleLily, ThatTrollzer, Kichura, ellieisjelly" }
val MAVEN_GROUP by extra { "uk.debb" }
val LICENSE by extra { "MPL-2.0" }
val MOD_VERSION by extra { "4.0.3" }
val MINECRAFT_VERSION by extra { "1.21.3" }
val MINECRAFT_VERSION_RANGE_FABRIC by extra { ">=1.21.2" }
val MINECRAFT_VERSION_RANGE_NEOFORGE by extra { "[1.21.2,1.22)" }
val H2_VERSION by extra { "2.3.232" }
val ASM_VERSION by extra { "9.7.1" }
val PARCHMENT_MC_VERSION by extra { "1.21" }
val PARCHMENT_VERSION by extra { "2024.07.28" }
val MIXIN_EXTRAS_VERSION by extra { "0.4.1" }
val FABRIC_MIXIN_VERSION by extra { "0.15.4+mixin.0.8.7" }
val FABRIC_LOADER_VERSION by extra { "0.16.9" }
val FABRIC_LOADER_VERSION_RANGE by extra { ">=0.15.10" }
val NEOFORGE_VERSION by extra { "21.3.4-beta"}
val NEOFORGE_LOADER_VERSION_RANGE by extra { ">=21.2.0-beta" }
allprojects {
apply(plugin = "java")
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
subprojects {
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
version = MOD_VERSION
group = MAVEN_GROUP
tasks.processResources {
val expandProps = mapOf(
"mod_name" to MOD_NAME,
"mod_description" to MOD_DESCRIPTION,
"mod_id" to MOD_ID,
"mod_author" to MOD_AUTHOR,
"credits" to CREDITS,
"license" to LICENSE,
"mod_version" to MOD_VERSION,
"minecraft_version" to MINECRAFT_VERSION,
"minecraft_version_range_fabric" to MINECRAFT_VERSION_RANGE_FABRIC,
"minecraft_version_range_neoforge" to MINECRAFT_VERSION_RANGE_NEOFORGE,
"fabric_loader_version_range" to FABRIC_LOADER_VERSION_RANGE,
"neoforge_loader_version_range" to NEOFORGE_LOADER_VERSION_RANGE
)
inputs.properties(expandProps)
filesMatching(listOf("pack.mcmeta", "fabric.mod.json", "META-INF/neoforge.mods.toml", "*.mixins.json")) {
expand(expandProps)
}
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
options.release.set(21)
}
// Disables Gradle's custom module metadata from being published to maven. The
// metadata includes mapped dependencies which are not reasonably consumable by
// other mod developers.
tasks.withType<GenerateModuleMetadata>().configureEach {
enabled = false
}
}