-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
210 lines (170 loc) · 7.67 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
200
201
202
203
204
205
206
207
208
209
210
plugins {
id 'fabric-loom' version '1.8-SNAPSHOT'
id 'maven-publish'
}
version = project.mod_version
group = project.maven_group
base {
archivesName = project.archives_base_name
}
repositories {
maven { url "https://maven.shedaniel.me" }
maven {
url "https://cursemaven.com"
content {
includeGroup "curse.maven"
}
}
maven {
name = "CottonMC"
url = "https://server.bbkr.space/artifactory/libs-release"
}
maven {
name = 'Ladysnake Mods'
url = 'https://maven.ladysnake.org/releases'
content {
includeGroup 'io.github.ladysnake'
includeGroupByRegex 'io\\.github\\.onyxstudios.*'
}
}
maven {
name = 'TerraformersMC'
url = 'https://maven.terraformersmc.com/'
}
maven { url = 'https://maven.minecraftforge.net/' }
maven { url = "https://maven.kyrptonaught.dev" }
maven { url = "https://api.modrinth.com/maven" }
maven {
// location of the maven that hosts JEI files since January 2023
name = "Jared's maven"
url = "https://maven.blamejared.com/"
}
maven {
// location of a maven mirror for JEI files, as a fallback
name = "ModMaven"
url = "https://modmaven.dev"
}
mavenCentral()
maven { url 'https://repo.repsy.io/mvn/jiraiyah/jilibs' }
}
loom {
// splitEnvironmentSourceSets()
// mods {
// "${archives_base_name}" {
// sourceSet sourceSets.main
// sourceSet sourceSets.client
// }
// }
accessWidenerPath = file("src/main/resources/${project.archives_base_name}.accesswidener")
}
fabricApi {
configureDataGeneration()
}
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
// Ji Lib Mods Dependency <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
modImplementation include("jiraiyah.logger:jilogger:${jilogger_version}")
modImplementation include("jiraiyah.config:jiconfig:${jiconfig_version}")
modImplementation include("jiraiyah.reference:jireference:${jireference_version}")
modImplementation include("jiraiyah.register:jiregister:${jiregister_version}")
modImplementation include("jiraiyah.jiralib:jiralib:${jiralib_version}")
modImplementation include("jiraiyah.inventory:jinventory:${jinventory_version}")
modImplementation include("jiraiyah.fluid:jifluid:${jifluid_version}")
modImplementation include("jiraiyah.energy:jienergy:${jienergy_version}")
modImplementation include("jiraiyah.machina:jimachina:${jimachina_version}")
// Energy API Handling Dependency <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
include modApi("teamreborn:energy:${project.energy_version}") {
exclude(group: "net.fabricmc.fabric-api")
}
// PAL <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
modImplementation "io.github.ladysnake:PlayerAbilityLib:${project.pal_version}"
include "io.github.ladysnake:PlayerAbilityLib:${project.pal_version}"
// LibGUI <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
//modImplementation include("io.github.cottonmc:LibGui:${project.libgui_version}")
// Terra Former Wood: Needed for Sign and Boat <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
//modImplementation "com.terraformersmc.terraform-api:terraform-wood-api-v1:${project.terraform_version}"
//include "com.terraformersmc.terraform-api:terraform-wood-api-v1:${project.terraform_version}"
// Kyrptonaught <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
//modImplementation "net.kyrptonaught:customportalapi:${project.kyrptonaught_version}"
//include "net.kyrptonaught:customportalapi:${project.kyrptonaught_version}"
// EMI Compatibility <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
//modCompileOnly "dev.emi:emi-fabric:${emi_version}:api"
// REI Compatibility <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
//modCompileOnly "me.shedaniel:RoughlyEnoughItems-api-fabric:${project.rei_version}"
//modRuntimeOnly "me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}"
// JEI Compatibility <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
//modCompileOnlyApi("mezz.jei:jei-${project.jei_mc_version}-fabric-api:${project.jei_version}")
//modRuntimeOnly("mezz.jei:jei-${project.jei_mc_version}-fabric:${project.jei_version}")
// Jade
modImplementation "curse.maven:jade-324717:${project.jade_version}"
// Mod Menu
modImplementation("com.terraformersmc:modmenu:${project.modmenu_version}")
// Mod Menu Badges Lib <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
include(modImplementation("maven.modrinth:modmenu-badges-lib:${badges_lib_version}"))
// Fluid Utils:Needed for Fluid Handling
//modImplementation include("com.github.drkhodakarami:fluidutils:${project.fluidutils_version}")
// Cloth Config
//modApi("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_version}") {
// exclude(group: "net.fabricmc.fabric-api")
//}
// Architectury
//modApi "dev.architectury:architectury-fabric:${project.architectury_version}"
// TerraBlender
//modImplementation "com.github.glitchfiend:TerraBlender-fabric:${project.terrablender_mc_version}-${project.terrablender_version}"
// Tech Reborn Runtime Only
//modRuntimeOnly("curse.maven:reborncore-237903:${project.reborn_curse_version}")
//modRuntimeOnly("curse.maven:techreborn-233564:${project.tech_reborn_version}")
// EMI Runtime Only
//modLocalRuntime "dev.emi:emi-fabric:${emi_version}"
// REI Runtime Only
//modRuntimeOnly "me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}"
// JEI Runtime Only
//modRuntimeOnly("mezz.jei:jei-${project.jei_mc_version}-fabric:${project.jei_version}")
}
processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}
tasks.withType(JavaCompile).configureEach {
it.options.release = 21
options.compilerArgs << '-Xlint:unchecked'
options.deprecation = true
}
java {
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
jar {
from("LICENSE") {
rename { "${it}_${project.base.archivesName.get()}"}
}
}
// configure the maven publication
publishing {
publications {
create("mavenJava", MavenPublication) {
artifactId = project.archives_base_name
from components.java
}
}
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
}
}
tasks.create("checkVersionFileValidation") {
doFirst {
File testFile = new File("${remapJar.archiveFile.get()}")
if (testFile.isFile()) {
throw new GradleException("project version is built before, change the project version >>> ${project.mod_version}")
} else {
println "Project version needs building >>> ${project.archives_base_name}-${project.mod_version}"
}
}
}
compileJava.dependsOn checkVersionFileValidation