-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
213 lines (174 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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
plugins {
id 'java'
id 'net.minecraftforge.gradle' version '5.1.+'
id 'org.parchmentmc.librarian.forgegradle' version '1.+'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'org.spongepowered.mixin' version '0.7.+'
id 'maven-publish'
}
apply plugin: 'maven-publish'
configurations {
library
}
group = 'foundry'
version = '1.1.1'
if (System.getenv('BUILD_NUMBER') != null) {
version += "." + System.getenv('BUILD_NUMBER')
}
java {
archivesBaseName = 'alembic'
toolchain.languageVersion = JavaLanguageVersion.of(17)
}
minecraft {
mappings channel: 'parchment', version: '2023.09.03-1.20.1'
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
runs {
configureEach {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
mods {
alembic {
source sourceSets.main
}
}
}
client {
property 'forge.enabledGameTestNamespaces', 'alembic'
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg"
}
server {
property 'forge.enabledGameTestNamespaces', 'alembic'
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg"
}
gameTestServer {
property 'forge.enabledGameTestNamespaces', 'alembic'
args "--mixin.config", "alembic.tests.mixins.json"
mods {
alembic {
source sourceSets.test
}
}
}
data {
args '--mod', 'alembic', '--all', '--output', file('src/test/generated/resources/'), '--existing', file('src/main/resources/')
}
}
}
mixin {
add sourceSets.main, "alembic.refmap.json"
config "alembic.mixins.json"
debug.verbose = true
debug.export = true
}
sourceSets.main.resources { srcDir 'src/generated/resources' }
repositories {
mavenCentral()
maven {
url "https://cursemaven.com"
content {
includeGroup "curse.maven"
}
}
maven { url 'https://jitpack.io' }
maven {
name = "TslatEntityStatus (TES) Maven Repo"
url = "https://dl.cloudsmith.io/public/tslat/tes/maven/"
}
maven {
name = "TslatEntityStatus (TEL) Maven Repo"
url = "https://dl.cloudsmith.io/public/tslat/tel/maven/"
}
maven {
name = "DefaultResources Maven Repo"
url = "https://maven.lukebemish.dev/releases"
}
maven {
url = "https://maven.shadowsoffire.dev/releases"
}
maven {
name = "Illusive Soulworks maven"
url = "https://maven.theillusivec4.top/"
}
}
dependencies {
minecraft 'net.minecraftforge:forge:1.20.1-47.1.3'
jarJar(implementation(fg.deobf("dev.lukebemish.defaultresources:defaultresources-forge-${project.minecraft_version}:${project.defaultresources_version}"))) {
jarJar.ranged(it, "[${project.defaultresources_version},)")
}
implementation(fg.deobf("net.tslat.effectslib:TslatEffectsLib-forge-1.20:${project.tel_version}"))
jarJar("net.tslat.effectslib:TslatEffectsLib-forge-1.20:${project.tel_version}") {
jarJar.ranged(it, "[1.5,)")
}
implementation(fg.deobf("net.tslat.tes:TES-forge-${project.minecraft_version}.1:${project.tes_version}"))
compileOnly(annotationProcessor("io.github.llamalad7:mixinextras-common:0.3.5"))
implementation(jarJar("io.github.llamalad7:mixinextras-forge:0.3.5")) {
jarJar.ranged(it, "[0.3.5,)")
}
implementation(fg.deobf( "dev.shadowsoffire:ApothicAttributes:1.20.1-1.2.1"))
implementation(fg.deobf("dev.shadowsoffire:Placebo:1.20.1-8.6.0"))
compileOnly(fg.deobf("top.theillusivec4.curios:curios-forge:5.9.1+1.20.1:api"))
runtimeOnly(fg.deobf("top.theillusivec4.curios:curios-forge:5.9.1+1.20.1"))
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
}
jar {
finalizedBy('reobfJar')
classifier 'slim'
manifest {
attributes([
"Specification-Title" : "alembic",
"Specification-Vendor" : "FoundryMC",
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.name,
"Implementation-Version" : project.jar.archiveVersion,
"Implementation-Vendor" : "amo, Farcr",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
tasks.withType(Copy) {
filesMatching("META-INF/mods.toml") {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
}
jarJar.enable()
reobf {
jarJar{}
}
tasks.assemble {
dependsOn(tasks.jarJar)
}
tasks.jarJar.configure {
classifier ''
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId project.group
artifactId project.archivesBaseName
version project.version
from components.java
// Allows the maven pom file to be modified.
pom.withXml {
// Go through all the dependencies.
asNode().dependencies.dependency.each { dep ->
println 'Surpressing artifact ' + dep.artifactId.last().value().last() + ' from maven dependencies.'
assert dep.parent().remove(dep)
}
}
}
}
repositories {
maven {
url "file://" + System.getenv("local_maven")
}
}
}
tasks.withType(GenerateModuleMetadata) {
enabled = false
}