-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.gradle
100 lines (87 loc) · 3.07 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
plugins {
alias libs.plugins.quilt.loom
}
base {
archivesName = project.archives_base_name
}
version = "$project.version+${libs.versions.minecraft.get()}"
group = project.maven_group
repositories {
maven {
name = "Fabric"
url = "https://maven.fabricmc.net/"
}
maven {
name = "TerraformersMC"
url = "https://maven.terraformersmc.com/"
}
maven {
name = "Ladysnake Libs"
url = "https://maven.ladysnake.org/releases"
}
maven {
name = "Sleeping Town"
url = "https://repo.sleeping.town"
content {
includeGroup "com.unascribed"
}
}
}
loom {
// Loom and Loader both use this block in order to gather more information about your mod.
mods {
// This should match your mod id.
"scout" {
// Tell Loom about each source set used by your mod here. This ensures that your mod's classes are properly transformed by Loader.
sourceSet("main")
// If you shade (directly include classes, not JiJ) a dependency into your mod, include it here using one of these methods:
// dependency("com.example.shadowedmod:1.2.3")
// configuration("exampleShadedConfigurationName")
}
}
}
dependencies {
minecraft "com.mojang:minecraft:${libs.versions.minecraft.get()}"
mappings "net.fabricmc:yarn:${libs.versions.minecraft.get()}+${libs.versions.yarn.get()}:v2"
modImplementation "net.fabricmc:fabric-loader:${libs.versions.fabric.loader.get()}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${libs.versions.fabric.api.get()}+${libs.versions.minecraft.get()}"
// not JiJ because it causes its mixins to fail to load
modApi "dev.emi:trinkets:${libs.versions.trinkets.get()}"
modApi include("com.unascribed:lib39-core:${libs.versions.lib39.get()}+${libs.versions.minecraft.get()}")
modApi include("com.unascribed:lib39-dessicant:${libs.versions.lib39.get()}+${libs.versions.minecraft.get()}")
modCompileOnly "dev.emi:emi-fabric:${libs.versions.emi.get()}+${libs.versions.minecraft.get()}:api"
modLocalRuntime "dev.emi:emi-fabric:${libs.versions.emi.get()}+${libs.versions.minecraft.get()}"
}
processResources {
inputs.property 'version', version
inputs.property 'minecraft_version', libs.versions.minecraft.get()
inputs.property 'fabric_version', libs.versions.fabric.api.get()
inputs.property 'trinkets_version', libs.versions.trinkets.get()
inputs.property 'lib39_version', libs.versions.lib39.get()
inputs.property 'emi_version', libs.versions.emi.get()
filesMatching('fabric.mod.json') {
expand (
"version": version,
"minecraft_version": libs.versions.minecraft.get(),
"fabric_version": libs.versions.fabric.api.get(),
"trinkets_version": libs.versions.trinkets.get(),
"lib39_version": libs.versions.lib39.get(),
"emi_version": libs.versions.emi.get()
)
}
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = 'UTF-8'
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.release = 17
}
java {
// Still required by IDEs such as Eclipse and Visual Studio Code
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
jar {
from('LICENSE') {
rename { "${it}_${base.archivesName.get()}" }
}
}