forked from IMB11/SnowUnderTrees
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
125 lines (104 loc) · 3.69 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
plugins {
id 'fabric-loom' version '1.9-SNAPSHOT'
id 'maven-publish'
}
var mcVersion = stonecutter.current.version
version = property("mod.version") + "+" + mcVersion
group = "dev.imb11"
base {
archivesName = property("mod.name")
}
repositories {
mavenCentral()
mavenLocal()
maven { url 'https://maven.wispforest.io' }
maven { url 'https://maven.imb11.dev/releases' }
maven { url "https://maven.isxander.dev/releases" }
maven { url "https://jitpack.io" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
maven { url "https://maven.quiltmc.org/repository/release" }
maven { url 'https://maven.terraformersmc.com/releases' }
maven { url 'https://maven.minecraftforge.net/releases/' }
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
filter {
includeGroup "maven.modrinth"
}
}
}
dependencies {
minecraft "com.mojang:minecraft:${stonecutter.current.version}"
mappings "net.fabricmc:yarn:${property('deps.yarn')}:v2"
modImplementation "net.fabricmc:fabric-loader:${property('deps.fabric_loader')}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${property('deps.fabric')}"
include modImplementation("dev.isxander:yet-another-config-lib:${property('deps.yacl')}") {
// Remove any fabric API modules.
exclude group: "net.fabricmc.fabric-api", module: "fabric-api"
}
modImplementation ("dev.imb11:mru:${property("deps.mru")}+${stonecutter.current.version.replace("1.21.1", "1.21").replace("1.21.3", "1.21.4")}+fabric", {
transitive = false
})
modRuntimeOnly modCompileOnly("com.terraformersmc:modmenu:${property('deps.modmenu')}")
if (stonecutter.eval(mcVersion, ">1.20.1")) {
modImplementation("maven.modrinth:serene-seasons:${property('deps.serene_seasons')}")
// modImplementation("maven.modrinth:glitchcore:${property('deps.glitchcore')}")
// implementation 'net.jodah:typetools:0.4.2'
}
}
if (stonecutter.current.active) { // run configs for non-active version would be invalid
loom {
runConfigs.all {
ideConfigGenerated = true // generate IDE tasks for running client, server and testmod, datagen if those are present
runDir "../../run" // use a global run directory for all versions
}
}
}
loom {
runs {
datagenClient {
client()
name "Data Generation Client"
vmArg "-Dfabric-api.datagen"
vmArg "-Dfabric-api.datagen.output-dir=" + getRootDir().toPath().resolve("src/main/generated")
vmArg "-Dfabric-api.datagen.modid=snowundertrees"
ideConfigGenerated = false
runDir "build/datagen"
}
}
}
processResources {
filesMatching("fabric.mod.json") {
expand 'mod_version': project.version,
'target_minecraft': project.property('mod.target'),
'target_mru': project.property('deps.mru'),
'target_fabricloader': project.property('deps.fabric_loader')
}
// duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
sourceSets {
main {
resources {
srcDirs += [
file('src/main/generated')
]
}
}
}
tasks.withType(JavaCompile).configureEach {
it.options.release = 17
}
java {
var version = stonecutter.eval(mcVersion, ">1.20.4") ? JavaVersion.VERSION_21 : JavaVersion.VERSION_17
sourceCompatibility = version
targetCompatibility = version
}
jar {
from("LICENSE") {
rename { "${it}_${project.base.archivesName.get()}"}
}
}