-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle
115 lines (93 loc) · 2.64 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
plugins {
id 'fabric-loom' version '1.0-SNAPSHOT'
id 'maven-publish'
}
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
archivesBaseName = project.mod_name
version = project.mod_version + "+" + project.version_meta
group = project.maven_group
loom {
runs {
datagenClient {
client()
name "Data Generation"
vmArg "-Dfabric-api.datagen"
vmArg "-Dfabric-api.datagen.output-dir=${file("src/generated/resources")}"
ideConfigGenerated = true
runDir "build/datagen"
source sourceSets.main
}
}
}
sourceSets {
main {
resources {
srcDir "src/generated/resources"
}
}
}
repositories {
maven { url "https://maven.terraformersmc.com/"}
maven { url "https://maven.shedaniel.me/" }
}
dependencies {
// Minecraft
minecraft "com.mojang:minecraft:${project.minecraft_version}"
// Yarn
mappings "net.fabricmc:yarn:${project.minecraft_version}+build.${project.yarn_mappings}:v${project.tiny_version}"
// Fabric Loader
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
// Fabric API
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fapi_version}"
// ModMenu
modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}"
// RoughlyEnoughItems
modImplementation "me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}"
// Architectury Fabric
modImplementation "dev.architectury:architectury-fabric:${project.arch_version}"
// Cloth Config
modApi ("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}") {
exclude module: "fabric-api" // irit
}
}
java {
withSourcesJar()
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release = 17
}
processResources {
inputs.property "version", project.mod_version
filesMatching("fabric.mod.json") {
expand "version": project.mod_version
}
}
jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}" }
}
manifest {
attributes([
"Specification-Title" : "${mod_name}",
"Specification-Vendor" : "${maven_group}",
"Specification-Version" : "${mod_version}",
"Implementation-Title" : "${mod_name}",
"Implementation-Version" : "${mod_version}",
"Implementation-Vendor" : "${maven_group}",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"MixinConfigs" : "${mod_name}.mixins.json"
])
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
repositories {
mavenLocal()
}
}