forked from CaffeineMC/sodium
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
88 lines (69 loc) · 2.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
plugins {
id 'fabric-loom' version '1.0-SNAPSHOT'
id 'io.github.juuxel.loom-quiltflower' version '1.7.2'
}
apply from: "${rootProject.projectDir}/gradle/fabric.gradle"
apply from: "${rootProject.projectDir}/gradle/java.gradle"
archivesBaseName = project.archives_base_name
version = getVersion()
group = project.maven_group
loom {
mixin {
defaultRefmapName = "mixins.sodium.refmap.json"
}
if (findProperty("sodium.use_custom_jvm_args") != "false") {
runs {
it.configureEach {
vmArgs("-Xmx3G", "-XX:+UseZGC")
}
}
}
accessWidenerPath.set file("src/main/resources/sodium.accesswidener")
}
configurations {
includeModImplementation
includeImplementation
include.extendsFrom includeImplementation
include.extendsFrom includeModImplementation
implementation.extendsFrom includeImplementation
modImplementation.extendsFrom includeModImplementation
}
repositories {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
content {
includeGroup "maven.modrinth"
}
}
}
dependencies {
//to change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
// Fabric API modules
includeModImplementation fabricApi.module("fabric-api-base", project.fabric_version)
includeModImplementation fabricApi.module("fabric-rendering-fluids-v1", project.fabric_version)
includeModImplementation fabricApi.module("fabric-rendering-data-attachment-v1", project.fabric_version)
includeModImplementation fabricApi.module("fabric-resource-loader-v0", project.fabric_version)
includeImplementation 'io.github.douira:glsl-transformer:0.27.0'
includeImplementation "org.joml:joml:1.10.4"
// Because we need the subprojects to be build as jars prior to their inclusion, we need to separate them to
// order them correctly.
implementation project(":components").subprojects
include project(":components").subprojects
if (findProperty("sodium.use_third_party_mods") != "false") {
modRuntimeOnly "maven.modrinth:lazydfu:0.1.3"
modRuntimeOnly "maven.modrinth:starlight:1.1.1+1.19"
modRuntimeOnly "maven.modrinth:lithium:mc1.19.2-0.8.3"
modRuntimeOnly "maven.modrinth:ferrite-core:5.0.0-fabric"
}
}
String getVersion() {
String version = "${project.mod_version}+mc${project.minecraft_version}"
if (findProperty("releaseType") != "stable") {
version += "-unstable"
}
return version
}