-
-
Notifications
You must be signed in to change notification settings - Fork 134
/
build.gradle
194 lines (167 loc) · 6.48 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
plugins {
id 'java-library'
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'net.neoforged.moddev' version '0.1.112'
id "com.modrinth.minotaur" version "2.+"
id 'net.darkhax.curseforgegradle' version '1.1.15'
}
version = minecraft_version + "-" + mod_version
group = mod_group_id
if (System.getenv('BUILD_NUMBER') != null) {
version += "." + System.getenv('BUILD_NUMBER')
}
repositories {
mavenLocal()
maven {
name = "BlameJared maven"
url = "https://maven.blamejared.com/"
}
maven {
url "https://www.cursemaven.com"
content {
includeGroup "curse.maven"
}
}
repositories {
maven {
name = "TerraformersMC"
url = "https://maven.terraformersmc.com/"
}
}
// Ender IO
maven {
url 'https://maven.rover656.dev/releases'
content {
includeGroup "com.enderio"
}
}
}
base {
archivesName = mod_id
}
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
//minecraft.accessTransformers.file rootProject.file('src/main/resources/META-INF/accesstransformer.cfg')
//minecraft.accessTransformers.entry public net.minecraft.client.Minecraft textureManager # textureManager
// Default run configurations.
// These can be tweaked, removed, or duplicated as needed.
neoForge {
version = "${neo_version}"
//accessTransformers.add(file('src/main/resources/META-INF/accesstransformer.cfg'))
parchment {
minecraftVersion = '1.21'
mappingsVersion = '2024.06.23'
}
runs {
client {
client()
}
server {
server()
}
data {
data()
programArguments.addAll '--mod', 'industrialforegoing', '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
}
}
mods {
industrialforegoing {
sourceSet sourceSets.main
}
}
}
// Include resources generated by data generators.
sourceSets.main.resources { srcDir 'src/generated/resources' }
dependencies {
compileOnly("mezz.jei:jei-1.21.1-neoforge-api:${jei_version}")
runtimeOnly("mezz.jei:jei-1.21.1-neoforge:${jei_version}")
implementation project.dependencies.create('com.hrznstudio:titanium:1.21-4.0.20')
implementation "curse.maven:jade-324717:5444008"
compileOnly "curse.maven:crafttweaker-239197:5606075"
implementation "vazkii.patchouli:Patchouli:${patchouli_version}"
//runtimeOnly "vazkii.patchouli:Patchouli:${patchouli_version}"
compileOnly "curse.maven:pneumaticcraft-repressurized-281849:5698172"
implementation "curse.maven:curios-continuation-1037991:5690713"
compileOnly "dev.emi:emi-neoforge:${emi_version}:api"
//runtimeOnly "dev.emi:emi-neoforge:${emi_version}"
runtimeOnly "curse.maven:mekanism-268560:5680395"
//runtimeOnly "com.enderio:enderio-base:${ender_io_version}"
//runtimeOnly "com.enderio:enderio-conduits:${ender_io_version}"
//runtimeOnly "com.enderio:enderio-machines:${ender_io_version}"
// Requires Additional mods like AE2 and RS
// runtimeOnly "com.enderio:enderio-conduits-modded:${ender_io_version}"
}
// This block of code expands all declared replace properties in the specified resource targets.
// A missing property will result in an error. Properties are expanded using ${} Groovy notation.
// When "copyIdeResources" is enabled, this will also run before the game launches in IDE environments.
// See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html
tasks.withType(ProcessResources).configureEach {
var replaceProperties = [
minecraft_version : minecraft_version,
minecraft_version_range: minecraft_version_range,
neo_version : neo_version,
neo_version_range : neo_version_range,
loader_version_range : loader_version_range,
mod_id : mod_id,
mod_name : mod_name,
mod_license : mod_license,
mod_version: version,
mod_authors : mod_authors,
mod_description : mod_description
]
inputs.properties replaceProperties
filesMatching(['META-INF/neoforge.mods.toml']) {
expand replaceProperties
}
}
// IDEA no longer automatically downloads sources/javadoc jars for dependencies, so we need to explicitly enable the behavior.
idea {
module {
downloadSources = true
downloadJavadoc = true
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = modBaseName
from components.java
}
}
repositories {
maven {
url "file://" + System.getenv("local_maven")
}
}
}
//tasks.publishCurseForge.enabled = System.env["CURSE_API"] != null
task publishCurseForge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge) {
apiToken = System.env["CURSE_API"]
// The main file to upload
def mainFile = upload(266515, jar)
mainFile.releaseType = 'beta'
mainFile.changelog = 'https://github.com/InnovativeOnlineIndustries/Industrial-Foregoing/blob/1.21/CHANGELOG.md'
mainFile.changelogType = 'markdown'
mainFile.addModLoader("NeoForge")
mainFile.addGameVersion("1.21")
mainFile.addGameVersion("1.21.1")
mainFile.addRequirement("titanium")
}
tasks.modrinth.enabled = System.env["MODRINTH_TOKEN"] != null
modrinth {
token = System.getenv("MODRINTH_TOKEN")
// This is the default. Remember to have the MODRINTH_TOKEN environment variable set or else this will fail, or set it to whatever you want - just make sure it stays private!
projectId = "lWxpUd04" // This can be the project ID or the slug. Either will work!
versionType = "beta" // This is the default -- can also be `beta` or `alpha`
uploadFile = jar // With Loom, this MUST be set to `remapJar` instead of `jar`!
gameVersions = ["1.21", "1.21.1"] // Must be an array, even with only one version
loaders = ["neoforge"] // Must also be an array - no need to specify this if you're using Loom or ForgeGradle
dependencies { // A special DSL for creating dependencies
required.project "titanium"
}
changelog = "https://github.com/InnovativeOnlineIndustries/Industrial-Foregoing/blob/1.21/CHANGELOG.md"
}