forked from SammySemicolon/MinersDelight
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
199 lines (175 loc) · 5.87 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
plugins {
id 'fabric-loom' version '1.5-SNAPSHOT'
id 'maven-publish'
}
version = mod_version
group = mod_group_id
base {
archivesName = "MinersDelight-Refabricated"
}
loom {
accessWidenerPath = file("src/main/resources/${mod_id}.accesswidener")
}
sourceSets.main.resources {
srcDirs += 'src/generated/resources'
}
repositories {
flatDir {
dirs 'mods'
}
mavenLocal()
maven { url "https://maven.parchmentmc.org" }
maven {
url "https://www.cursemaven.com"
allowInsecureProtocol true
}
maven {
url "https://maven.firstdarkdev.xyz/snapshots"
}
maven {
name 'Ladysnake Mods'
url 'https://maven.ladysnake.org/releases'
}
maven {
url "https://api.modrinth.com/maven"
}
maven {
name "Greenhouse Maven"
url 'https://maven.greenhouseteam.dev/releases/'
}
maven {
name "BlameJared"
url "https://maven.blamejared.com/"
} // CraftTweaker, JEI
maven {
url "https://maven.ryanliptak.com/"
} // AppleSkin
maven {
url "https://maven.parchmentmc.org"
} // Parchment
maven {
url "https://maven.fabricmc.net/"
} // FAPI, Loader
maven {
url "https://mvn.devos.one/snapshots/"
}
maven {
url "https://mvn.devos.one/releases/"
} // Registrate, Porting Lib, Forge Tags, Milk Lib
maven {
url "https://jitpack.io/"
} // for Porting Lib: Fabric ASM
maven {
url "https://maven.shedaniel.me/"
} // REI and deps
maven {
url "https://maven.terraformersmc.com/"
} // Mod Menu, EMI
maven {
url "https://maven.jamieswhiteshirt.com/libs-release"
content {
includeGroup("com.jamieswhiteshirt")
}
} // Reach Entity Attributes
mavenCentral() // Mixin Extras
}
dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings loom.layered() {
it.parchment("org.parchmentmc.data:parchment-${project.parchment_version}")
it.officialMojangMappings {
setNameSyntheticMembers(false)
}
}
modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_api_version}"
modImplementation "vectorwing:FarmersDelight-Refabricated:${fdrf_version}"
modApi(include("com.tterrag.registrate_fabric:Registrate:${registrate_version}")) {
exclude(group: "io.github.fabricators_of_create")
}
annotationProcessor "io.github.llamalad7:mixinextras-fabric:${mixin_extras_version}"
annotationProcessor 'net.fabricmc:sponge-mixin:0.12.5+mixin.0.8.5'
modLocalRuntime("com.terraformersmc:modmenu:${modmenu_version}")
modCompileOnly("com.blamejared.crafttweaker:CraftTweaker-fabric-1.20.1:${crafttweaker_version}")
// Uncomment the below to test CraftTweaker.
// modLocalRuntime("com.blamejared.crafttweaker:CraftTweaker-fabric-1.20.1:${crafttweaker_version}")
modCompileOnly("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}")
modCompileOnly("mezz.jei:jei-${minecraft_version}-fabric-api:${jei_version}")
// Uncomment the below to test JEI.
modLocalRuntime("mezz.jei:jei-${minecraft_version}-fabric:${jei_version}")
modCompileOnly "me.shedaniel:RoughlyEnoughItems-api-fabric:${rei_version}"
modCompileOnly "me.shedaniel:RoughlyEnoughItems-default-plugin-fabric:${rei_version}"
// Uncomment the below to test REI.
// modRuntimeOnly "me.shedaniel:RoughlyEnoughItems-fabric:${rei_version}"
modCompileOnly("dev.emi:emi-fabric:${emi_version}:api") {
exclude(group: "net.fabricmc.fabric-api")
}
// Uncomment the below to test EMI.
/*
modLocalRuntime("dev.emi:emi-fabric:${emi_version}") {
exclude(group: "net.fabricmc.fabric-api")
}
// This is also required for EMI as it uses an out of date FAPI.
modLocalRuntime "net.fabricmc.fabric-api:fabric-api-deprecated:${fabric_api_version}"
*/
}
processResources {
var replaceProperties = [
minecraft_version : minecraft_version,
minecraft_min_version: minecraft_min_version,
minecraft_max_version: minecraft_max_version,
mod_id : mod_id,
mod_name : mod_name,
mod_version : mod_version,
mod_license : mod_license,
mod_authors : mod_authors,
mod_description : mod_description,
mod_credits : mod_credits,
mod_homepage : mod_homepage,
mod_github : mod_github
]
// setting them as input
inputs.properties replaceProperties
filesMatching("fabric.mod.json") {
expand replaceProperties + [project: project]
}
filesMatching("${mod_id}.mixins.json") {
expand archivesBaseName: archivesBaseName
}
}
tasks.withType(JavaCompile).configureEach {
it.options.release = 17
}
java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
jar {
exclude ".cache"
}
// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
groupId project.group
artifactId project.archivesBaseName
version project.version
from components.java
}
}
repositories {
maven {
name "repository"
url "https://maven.dragons.plus/releases"
credentials(PasswordCredentials)
authentication {
basic(BasicAuthentication)
}
}
}
}