forked from TinyModularThings/UniqueEnchantments
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
223 lines (200 loc) · 6.31 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
214
215
216
217
218
219
220
221
222
223
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
maven { url = 'https://repo.spongepowered.org/maven' }
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '4.1.+', changing: true
classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: "org.spongepowered.mixin"
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
version = "1.16.5-"+new Date().format("dd")+"-"+Math.abs(new Random().nextInt())
group = "uniquee"
archivesBaseName = "Unique Enchantments"
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
repositories {
maven {
url = "https://www.cursemaven.com"
}
}
minecraft {
mappings channel: 'official', version: '1.16.5'
runs {
client {
workingDirectory project.file('run')
arg "-mixin.config=uniquebase.mixins.json"
}
server {
workingDirectory project.file('run')
arg "-mixin.config=uniquebase.mixins.json"
}
data {
workingDirectory project.file('run')
arg "-mixin.config=uniquebase.mixins.json"
}
}
}
sourceSets.main.resources { srcDir 'src/generated/resources' }
sourceSets {
tools {
java {
compileClasspath += main.output
runtimeClasspath += main.output
}
}
}
configurations {
toolsCompile.extendsFrom compile;
}
dependencies {
minecraft 'net.minecraftforge:forge:1.16.5-36.0.40'
compile fg.deobf("curse.maven:firstaid-276837:3152708")
compile fg.deobf("curse.maven:configured-457570:3340535")
compile fg.deobf("curse.maven:jei-238222:3514175")
compile fg.deobf("curse.maven:enchantment-descriptions-250419:3488440")
compile fg.deobf("curse.maven:bookshelf-228525:3474499")
compile fg.deobf("curse.maven:patchouli-306770:3459118")
annotationProcessor 'org.spongepowered:mixin:0.8:processor'
}
mixin {
add sourceSets.main, "mixins.uniquebase.refmap.json"
}
task runAutomatedIconGen(type: JavaExec) {
group = 'internal'
description = 'Generates the Icon Uniquecodes automatically'
classpath = sourceSets.tools.runtimeClasspath
main = 'automation.AutomatedIconGen'
args file('src/main/resources').absolutePath, file('src/tools/resources/icons.json')
}
jar {
manifest {
attributes([
"Specification-Title": "uniquee",
"Specification-Vendor": "uniquee",
"Specification-Version": "1",
"Implementation-Title": project.name,
"Implementation-Version": "${version}",
"Implementation-Vendor" :"uniquee",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"MixinConfigs": "uniquebase.mixins.json"
])
}
includeEmptyDirs = false
}
jar.finalizedBy('reobfJar')
task baseJar(type: Jar, dependsOn: reobf) {
baseName = 'Unique Enchantments Base'
version = minecraft_version+"-"+unique_base_version
from(zipTree(jar.archivePath)) {
include 'META_INF/MANIFEST.MF'
include '**/uniquebase/**/*'
include '**/assets/uniquebase/**/*'
include '**/assets/minecraft/**/*'
include 'pack.mcmeta'
include 'uniquebase.mixins.json'
include 'mixins.uniquebase.refmap.json'
}
manifest {
attributes([
"MixinConfigs": "uniquebase.mixins.json"
])
}
from(zipTree(jar.archivePath)) {
include 'META-INF/unique_base_mods.toml'
rename 'unique_base_mods.toml', 'mods.toml'
expand 'version': unique_base_version
}
includeEmptyDirs = false
}
task mainJar(type: Jar, dependsOn: reobf) {
baseName = 'Unique Enchantments'
version = minecraft_version+"-"+uniquee_version
from(zipTree(jar.archivePath)) {
include 'META_INF/MANIFEST.MF'
include '**/uniquee/**/*'
include '**/assets/uniquee/**/*'
include '**/data/uniquee/**/*'
include '**/data/forge/**/*'
include 'pack.mcmeta'
}
from(zipTree(jar.archivePath)) {
include 'META-INF/uniquee_mods.toml'
rename 'uniquee_mods.toml', 'mods.toml'
expand 'version': uniquee_version, 'base_version': unique_base_version
}
includeEmptyDirs = false
}
task utilsJar(type: Jar, dependsOn: reobf) {
baseName = 'Unique Enchantments Utils'
version = minecraft_version+"-"+unique_utils_version
from(zipTree(jar.archivePath)) {
include 'META_INF/MANIFEST.MF'
include '**/uniqueeutils/**/*'
include '**/assets/uniqueutil/**/*'
include 'pack.mcmeta'
}
from(zipTree(jar.archivePath)) {
include 'META-INF/unique_utils_mods.toml'
rename 'unique_utils_mods.toml', 'mods.toml'
expand 'version': unique_utils_version, 'base_version': unique_base_version
}
includeEmptyDirs = false
}
task battleJar(type: Jar, dependsOn: reobf) {
baseName = 'Unique Enchantments Battle'
version = minecraft_version+"-"+unique_battle_version
from(zipTree(jar.archivePath)) {
include 'META_INF/MANIFEST.MF'
include '**/uniqueebattle/**/*'
include '**/assets/uniquebattle/**/*'
include '**/data/uniquebattle/**/*'
include 'pack.mcmeta'
}
from(zipTree(jar.archivePath)) {
include 'META-INF/unique_battle_mods.toml'
rename 'unique_battle_mods.toml', 'mods.toml'
expand 'version': unique_battle_version, 'base_version': unique_base_version
}
includeEmptyDirs = false
}
task apexJar(type: Jar, dependsOn: reobf) {
baseName = 'Unique Enchantments Apex'
version = minecraft_version+"-"+unique_apex_version
from(zipTree(jar.archivePath)) {
include 'META_INF/MANIFEST.MF'
include '**/uniqueapex/**/*'
include '**/assets/uniqueapex/**/*'
include '**/data/uniqueapex/**/*'
include 'pack.mcmeta'
}
from(zipTree(jar.archivePath)) {
include 'META-INF/unique_apex_mods.toml'
rename 'unique_apex_mods.toml', 'mods.toml'
expand 'version': unique_apex_version, 'base_version': unique_base_version
}
includeEmptyDirs = false
}
artifacts {
archives baseJar
archives mainJar
archives utilsJar
archives battleJar
archives apexJar
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact jar
}
}
repositories {
maven {
url "file:///${project.projectDir}/mcmodsrepo"
}
}
}