generated from isXander/FabricModTemplate
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.gradle
100 lines (84 loc) · 3.3 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 {
id 'fabric-loom' version '1.9-SNAPSHOT'
}
version = property("mod.version") + "+" + stonecutter.current.version
group = "dev.isxander"
base {
archivesName = property("mod.name")
}
repositories {
mavenCentral()
maven { url = "https://maven.isxander.dev/releases" }
maven { url = "https://maven.isxander.dev/snapshots" }
maven { url = "https://maven.flashyreese.me/releases" }
maven { url = "https://maven.bawnorton.com/releases" }
maven { url = 'https://maven.fallenbreath.me/releases' }
maven { url = "https://maven.flashyreese.me/snapshots" }
maven { url = "https://maven.shedaniel.me" }
maven { url = "https://maven.terraformersmc.com" }
maven { url = "https://jitpack.io" }
maven { url = "https://maven.gegy.dev" }
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")}"
modRuntimeOnly "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("maven.modrinth:sodium:${property('deps.sodium')}")
modRuntimeOnly modCompileOnly("com.terraformersmc:modmenu:${property('deps.modmenu')}")
// sodium extra better options compat
modImplementation "maven.modrinth:sodium-extra:${property('deps.sodium-extra')}"
// moreculling category placement
modImplementation "maven.modrinth:moreculling:${property('deps.moreculling')}"
// iris category placement
modCompileOnly "maven.modrinth:iris:${property('deps.iris')}"
modRuntimeOnly("maven.modrinth:cloth-config:${property('runtime.cloth')}")
include modImplementation("net.caffeinemc:CaffeineConfig:1.3.0+1.17")
include modImplementation('me.fallenbreath:conditional-mixin-fabric:+')
include(implementation(annotationProcessor("com.github.bawnorton.mixinsquared:mixinsquared-fabric:0.2.0")))
}
processResources {
filesMatching("fabric.mod.json") {
expand 'mod_version': project.version,
'target_minecraft': project.property('mod.target'),
'target_sodium': project.property("target.sodium"),
'target_fabricloader': project.property('deps.fabric_loader')
}
}
java {
var version = JavaVersion.VERSION_21
sourceCompatibility = version
targetCompatibility = version
}
jar {
from("LICENSE") {
rename { "${it}_${project.base.archivesName.get()}"}
}
}
tasks.register('buildAndCollect', Copy) {
group = "build"
from(tasks.remapJar.archiveFile)
into(rootProject.layout.buildDirectory.file("libs"))
dependsOn("build")
}
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
}
}