forked from VazkiiMods/Quark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
118 lines (94 loc) · 3.68 KB
/
build.gradle
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
plugins {
id 'org.quiltmc.loom' version '1.+'
id 'maven-publish'
}
version = mod_version
group = maven_group
archivesBaseName = archives_base_name
repositories {
maven { url = "https://maven.quiltmc.org/repository/release" } // Quilt, Quilt Mappings
maven { url = 'https://maven.parchmentmc.org' } // Parchment Mappings
maven { url = "https://mvn.devos.one/snapshots/" } // Porting Lib, AutoRegLib Port
maven { url = "https://jitpack.io/" } // Mixin Extras
maven { url = "https://maven.terraformersmc.com/" } // EMI
maven { url = 'https://maven.minecraftforge.net/' } // TerraBlender
maven { url = "https://cursemaven.com" } // Lootr Fabric
maven { url = "https://api.modrinth.com/maven" } // Lootr Fabric
}
dependencies {
minecraft "com.mojang:minecraft:${minecraft_version}" // Minecraft
mappings(loom.layered { // Mappings
it.mappings("org.quiltmc:quilt-mappings:${minecraft_version}+build.${qm_version}:intermediary-v2")
it.parchment("org.parchmentmc.data:parchment-${minecraft_version}:${parchment_version}@zip")
it.officialMojangMappings { nameSyntheticMembers = false }
})
modImplementation "org.quiltmc:quilt-loader:${quilt_loader_version}"
modImplementation "org.quiltmc.quilted-fabric-api:quilted-fabric-api:${qfapi_version}-${minecraft_version}"
modImplementation(include("io.github.fabricators_of_create.Porting-Lib:Porting-Lib:${porting_lib_version}"))
modImplementation "vazkii.autoreglib:AutoRegLib-${minecraft_version}:${autoreglib_version}"
modImplementation "com.github.glitchfiend:TerraBlender-fabric:${minecraft_version}-${terrablender_version}"
modImplementation "curse.maven:lootr-fabric-615106:${lootr_version}"
modImplementation include("com.github.LlamaLad7:MixinExtras:0.1.1")
modImplementation(include("maven.modrinth:forge-config-api-port:4.2.11"))
annotationProcessor "com.github.LlamaLad7:MixinExtras:0.1.1"
modImplementation "dev.emi:emi-fabric:${emi_version}" // EMI
}
configurations.configureEach {
exclude(group: "net.fabricmc", module: "fabric-loader")
exclude(group: "net.fabricmc.fabric-api")
}
sourceSets {
main {
resources {
srcDir("src/generated/resources")
exclude("src/generated/resources/.cache")
}
}
}
loom {
accessWidenerPath = file("src/main/resources/quark.accesswidener")
runs {
datagen {
client()
name "Data Generation"
vmArg "-Dfabric-api.datagen"
vmArg "-Dfabric-api.datagen.output-dir=${file("src/generated/resources")}"
vmArg "-Dfabric-api.datagen.modid=quark"
vmArg "-Dporting_lib.datagen.existing_resources=${file("src/main/resources")}"
}
server {
runDir "run/server"
}
}
}
processResources {
Map<String, Object> properties = [
"version": version,
"minecraft_version": minecraft_version,
"loader_version": quilt_loader_version
]
properties.forEach((k, v) -> inputs.property(k, v))
filesMatching("quilt.mod.json") {
expand properties
}
}
def targetJavaVersion = 17
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
it.options.release = targetJavaVersion
}
}
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
archivesBaseName = archives_base_name
withSourcesJar()
}
jar {
from("LICENSE") {
rename { "${it}_${archivesBaseName}"}
}
}