-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
136 lines (112 loc) · 4.98 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
import net.fabricmc.loom.api.LoomGradleExtensionAPI
plugins {
id("fabric-loom") version "1.7.+"
}
version = "mod_version"()
group = "maven_group"()
base.archivesName.set("archives_base_name"())
repositories {
maven("https://maven.quiltmc.org/repository/release") // Quilt Mappings
maven("https://maven.parchmentmc.org") // Parchment mappings
maven("https://mvn.devos.one/snapshots/") // Create, Porting Lib, Forge Tags, Milk Lib, Registrate
maven("https://mvn.devos.one/releases/") // Porting Lib Releases
maven("https://raw.githubusercontent.com/Fuzss/modresources/main/maven/") // Forge Config API Port
maven("https://maven.jamieswhiteshirt.com/libs-release") // Reach Entity Attributes
maven("https://jitpack.io/") // Fabric ASM
maven("https://maven.tterrag.com/") // Flywheel
maven("https://api.modrinth.com/maven")
maven("https://maven.ithundxr.dev/releases")
maven("https://maven.shedaniel.me/") // Mantle deps
exclusiveMaven("https://maven.ladysnake.org/releases", "dev.onyxstudios.cardinal-components-api") // Cardinal Components
exclusiveMaven("https://maven.wispforest.io", "me.alphamode")
exclusiveMaven("https://maven.terraformersmc.com/releases/", "com.terraformersmc")
exclusiveMaven("https://repo.erdbeerbaerlp.de/repository/maven-public/", "de.erdbeerbaerlp")
exclusiveMaven("https://maven.blamejared.com/", "tschipp.carryon")
flatDir {
dirs(setOf("libs"))
}
}
dependencies {
"minecraft"("com.mojang:minecraft:${"minecraft_version"()}")
val loom = project.extensions.getByType<LoomGradleExtensionAPI>()
mappings(loom.layered {
officialMojangMappings { nameSyntheticMembers = false }
parchment("org.parchmentmc.data:parchment-${"minecraft_version"()}:${"parchment_version"()}@zip")
})
modImplementation("net.fabricmc:fabric-loader:${"fabric_loader_version"()}")
modImplementation("net.fabricmc.fabric-api:fabric-api:${"fabric_api_version"()}")
// Hep
modImplementation("maven.modrinth:hephaestus:${"minecraft_version"()}-${"hephaestus_version"()}")
modImplementation("slimeknights.mantle:Mantle:${"minecraft_version"()}-${"mantle_version"()}")
for (pl_module in "accessors,attributes,base,brewing,client_events,core,common,config,data,entity,extensions,items,models,model_loader,networking,tags,tool_actions,transfer,fluids,lazy_registration,loot,utility".split(",")) {
modRuntimeOnly("io.github.fabricators_of_create.Porting-Lib:${pl_module}:2.3.4+1.20.1")
}
// Create
modImplementation("com.simibubi.create:create-fabric-${"minecraft_version"()}:${"create_version"()}")
// SNR & Numi
modCompileOnly("com.railwayteam.railways:Steam_Rails-fabric-1.20.1:1.6.4+fabric-mc1.20.1")
modCompileOnly("dev.ithundxr.createnumismatics:CreateNumismatics-fabric-1.20.1:1.0.6+fabric-mc1.20.1")
// Workarounds
modCompileOnly("maven.modrinth:copycats:fabric.1.20.1-1.3.2")
modCompileOnly("maven.modrinth:appleskin:2.5.1+mc1.20")
// Compat
modCompileOnly("maven.modrinth:banhammer:0.7.1+1.20.1")
modCompileOnly(":ACME_Admin-0.1.0-beta.1+fabric-mc1.20.1-local")
modCompileOnly("de.erdbeerbaerlp:dcintegration.common:3.0.7") {
isChanging = true
isTransitive = false
}
modCompileOnly("maven.modrinth:enchancement:1.20-26")
modCompileOnly("tschipp.carryon:carryon-fabric-1.20.1:2.1.2.7") { isTransitive = false }
// OPAC API
modCompileOnlyApi("maven.modrinth:open-parties-and-claims:fabric-1.20.1-0.23.2")
// Serene Seasons
modCompileOnly("maven.modrinth:serene-seasons:4RgDk9NB")
modCompileOnly("maven.modrinth:glitchcore:25HLOiOl")
}
tasks.processResources {
// set up properties for filling into metadata
val properties = mapOf(
"version" to version,
"fabric_loader_version" to "fabric_loader_version"(),
"fabric_api_version" to "fabric_api_version"(),
"minecraft_version" to "minecraft_version"(),
)
inputs.properties(properties)
filesMatching("fabric.mod.json") {
expand(properties)
}
}
val targetJavaVersion = 17
tasks.withType<JavaCompile>().configureEach {
options.encoding = "UTF-8"
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
options.release.set(targetJavaVersion)
}
}
java {
val javaVersion = JavaVersion.toVersion(targetJavaVersion)
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
withSourcesJar()
}
tasks.jar {
from("LICENSE") {
rename { "${it}_${base.archivesName}"}
}
}
operator fun String.invoke(): String {
return rootProject.ext[this] as? String
?: throw IllegalStateException("Property $this is not defined")
}
fun RepositoryHandler.exclusiveMaven(url: String, vararg groups: String) {
exclusiveContent {
forRepository { maven(url) }
filter {
groups.forEach {
includeGroup(it)
}
}
}
}