-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
181 lines (148 loc) · 6.14 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
plugins {
id 'fabric-loom' version '0.8-SNAPSHOT'
id 'maven-publish'
}
sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
archivesBaseName = project.mod_id
group = project.maven_group
if (System.env.CI == "true") {
version = "${project.mod_version}+a${System.env.GITHUB_RUN_NUMBER}.${System.env.GITHUB_REF.replaceAll("refs/heads/", "").replaceAll("/", "-")}"
}
else {
version = "${project.mod_version}+${project.minecraft_version}-fabric"
}
minecraft {}
repositories {
maven {
name = "Dodo Gang Maven Repo"
url = "http://maven.dodogang.net/releases/"
allowInsecureProtocol = true
}
maven { url "https://jitpack.io/" }
maven { url "https://maven.dblsaiko.net/" }
maven { url "https://server.bbkr.space/artifactory/libs-release/" }
maven { url 'https://maven.blamejared.com/' }
maven { url "https://maven.fabricmc.net/" }
maven { url "https://maven.shedaniel.me/" }
maven { url "https://maven.shadew.net/" }
maven { url "https://maven.enginehub.org/repo/" }
maven { url "https://aperlambda.github.io/maven/" }
maven { url "https://maven.gegy.dev/" }
maven { url = "https://maven.terraformersmc.com/releases/" }
// maven { url 'https://raw.githubusercontent.com/TerraformersMC/Archive/main/releases/' }
}
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.minecraft_version}+build.${project.yarn_build}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
/*
* COMPATIBILITY
*/
/*String canvas = "grondag:canvas-mc117-1.17:${project.canvas_version}"
if (!Boolean.parseBoolean("${project.ip_enabled}") && Boolean.parseBoolean("${project.canvas_enabled}")) { // Immersive Portals is incompatible with Canvas
modImplementation(canvas) {
exclude group: "net.fabricmc.fabric-api"
exclude group: "me.shedaniel.cloth"
}
} else {
modCompileOnly(canvas) {
exclude group: "net.fabricmc.fabric-api"
exclude group: "me.shedaniel.cloth"
}
}*/
String ip = "com.github.qouteall.ImmersivePortalsMod:build:${project.ip_version}"
if (Boolean.parseBoolean("${project.ip_enabled}")) {
modImplementation(ip) {
exclude group: "net.fabricmc.fabric-api"
exclude group: "me.shedaniel.cloth"
exclude group: "com.github.Virtuoel"
}
} else {
modCompileOnly(ip) {
exclude group: "net.fabricmc.fabric-api"
exclude group: "me.shedaniel.cloth"
exclude group: "com.github.Virtuoel"
}
}
modImplementation("com.github.teamhollow:fallingblocktweaks:${project.fbt_version}")
/*
* LIBRARIES
*/
include("com.github.andantedevs:chord:${project.chord_version}") { exclude group: "com.terraformersmc" }
modImplementation("com.github.andantedevs:chord:${project.chord_version}") { exclude group: "com.terraformersmc" }
modImplementation ("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}")
include ("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}")
modImplementation("com.terraformersmc:modmenu:${project.mod_menu_version}") { exclude group: "net.fabricmc.fabric-api" }
modImplementation("net.shadew:jedt:${project.jedt_version}") { exclude group: "net.fabricmc.fabric-api" }
include("net.shadew:shwutil:${project.shwutil_version}")
implementation("net.shadew:shwutil:${project.shwutil_version}") // not a mod, no need for modImplementation
include("net.shadew:ptg:${project.ptg_version}")
implementation("net.shadew:ptg:${project.ptg_version}") // neither a mod
/*
* RUNTIME UTILITIES
*/
modRuntime("com.github.joaoh1:OkZoomer:${project.okzoomer_version}") {
exclude group: "net.fabricmc.fabric-api"
exclude group: "me.shedaniel.cloth"
exclude group: "com.terraformersmc"
}
String sodium = "me.jellysquid.mods:sodium-fabric:${project.sodium_version}"
if (!Boolean.parseBoolean("${project.ip_enabled}") && !Boolean.parseBoolean("${project.canvas_enabled}")) {
modRuntime(sodium) { exclude group: "net.fabricmc.fabric-api" }
} else {
modCompileOnly(sodium) { exclude group: "net.fabricmc.fabric-api" }
}
// modRuntime("me.jellysquid.mods:lithium:${project.lithium_version}") { exclude group: "net.fabricmc.fabric-api" }
// modRuntime("com.github.CaffeineMC:phosphor-fabric:${project.phosphor_version}") { exclude group: "net.fabricmc.fabric-api" }
// modRuntime("com.github.CaffeineMC:hydrogen-fabric:${project.hydrogen_version}") { exclude group: "net.fabricmc.fabric-api" }
}
loom {
accessWidener "src/main/resources/${project.mod_id}.accesswidener"
runs {
data {
server()
vmArg "-Dmarbles.datagen=true"
vmArg "-Dmarbles.datagen.path=\"${project.file("src/generated/resources")};${project.file("$buildDir/resources/main")}\""
}
}
}
processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
// Minecraft 1.17 (21w19a) upwards uses Java 16.
it.options.release = 16
}
jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact(remapJar) {
builtBy remapJar
}
}
}
}
processResources {
// Specify auto_datagen in your local gradle properties (~/.gradle/gradle.properties) if you want datagen to run
// automatically
if (project.getProperties().containsKey("auto_datagen") && Boolean.parseBoolean("${project.getProperties().get("auto_datagen")}")) {
finalizedBy runData
}
}
sourceSets.main.resources {
srcDirs += "$projectDir/src/generated/resources"
}
loom {
accessWidener "src/main/resources/marbles.accesswidener"
}