-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
118 lines (97 loc) · 4.02 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 "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.6-SNAPSHOT" apply false
id "io.github.pacifistmc.forgix" version "1.2.6"
}
architectury {
minecraft = minecraft_version
}
forgix {
group = "dev.ultreon"
// This is the common group of the mod which by default in Architectury Template it's defined as "maven_group" in your gradle.properties. If this property is not defined then by default it'll fetch the group from the maven_group property in your gradle.properties
mergedJarName = "ERROR422.jar"
// This is the name of the merged jar. If this property is not defined then by default it'll fetch the "archives_base_name" property with the "mod_version" property in your gradle.properties.
outputDir = "build/libs/merged"
// This is the output directory of the merged jar from the root project. If this property is not defined then by default it's set to "Merged".
forge {
projectName = "forge"
// This is the name of the forge project. If this property is not defined then by default it'll set to "forge" since that's the name the Architectury Template uses.
jarLocation = "build/libs/ERROR422-${mod_version}.jar"
// This is the location of the forge jar from the forge project. If this property is not defined then by default it fetches the jar with the shortest name.
mixin "error422.mixins.json" // This is in case if we didn't auto detect the forge mixins.
mixin "error422-common.mixins.json"
}
fabric {
projectName = "fabric"
// This is the name of the fabric project. If this property is not defined then by default it'll set to "fabric" since that's the name the Architectury Template uses.
jarLocation = "build/libs/ERROR422-${mod_version}.jar"
// This is the location of the fabric jar from the fabric project. If this property is not defined then by default it fetches the jar with the shortest name.
}
}
mergeJars.dependsOn(":fabric:build")
mergeJars.dependsOn(":forge:build")
tasks.register("buildAll") {
group = "build"
dependsOn(":fabric:build")
dependsOn(":forge:build")
dependsOn(mergeJars)
}
subprojects {
apply plugin: "dev.architectury.loom"
loom {
silentMojangMappingsLicense()
}
repositories {
maven {
name "Jitpack"
url "https://cursemaven.com"
content {
includeGroup "curse.maven"
}
}
maven {
name = 'ParchmentMC'
url = 'https://maven.parchmentmc.org'
}
maven {
name "Jitpack"
url "https://jitpack.io"
}
flatDir {
dir "$projectDir/libs"
}
}
dependencies {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
// The following line declares the mojmap mappings, you may use other mappings as well
mappings loom.layered() {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-1.20.1:2023.09.03@zip")
}
}
}
allprojects {
apply plugin: "java"
apply plugin: "architectury-plugin"
apply plugin: "maven-publish"
archivesBaseName = archives_base_name
version = mod_version
group = maven_group
repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
maven { url "https://jitpack.io/"}
maven { url "https://maven.terraformersmc.com/releases" }
maven { url "https://raw.githubusercontent.com/Fuzss/modresources/main/maven/" }
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.release = 17
}
java {
withSourcesJar()
}
}