forked from chris-wjn/ImprovedDamageFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
203 lines (179 loc) · 7.89 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
buildscript {
repositories {
// These repositories are only for Gradle plugins, put any other repositories in the repository block further below
maven { url = 'https://maven.minecraftforge.net' }
maven { url = 'https://repo.spongepowered.org/maven' }
maven { url = 'https://maven.parchmentmc.org' }
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
classpath group: 'org.spongepowered', name: 'mixingradle', version: '0.7.+', changing: true
classpath 'org.parchmentmc:librarian:1.+'
}
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'org.parchmentmc.librarian.forgegradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'org.spongepowered.mixin'
version = '0.4.0-1.19.2'
group = 'net.cwjn.idf' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'idf'
// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
minecraft {
mappings channel: 'parchment', version: '2022.11.27-1.19.2'
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Currently, this location cannot be changed from the default.
runs {
client {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
args '-mixin.config=idf.mixin.json'
mods {
idf {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
args '-mixin.config=idf.mixin.json'
mods {
idf {
source sourceSets.main
}
}
}
data {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
args '--mod', 'idf', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/'), '-mixin.config=idf.mixin.json'
mods {
idf {
source sourceSets.main
}
}
}
}
}
// Include resources generated by data generators.
sourceSets.main.resources { srcDir 'src/generated/resources' }
def gpr_creds = {
username = property('gpr.username')
password = property('gpr.token')
}
repositories {
maven {
url "https://cursemaven.com"
}
maven {
name = "blamejared maven"
url = "https://maven.blamejared.com/"
}
maven {
name = "Progwml6 maven"
url = "https://dvs1.progwml6.com/files/maven/"
}
maven {
url = "https://maven.theillusivec4.top/"
}
maven {
url 'https://api.modrinth.com/maven'
}
jcenter()
mavenCentral()
mavenLocal()
}
dependencies {
minecraft 'net.minecraftforge:forge:1.19.2-43.3.2'
//STAPLES
// compile against the JEI API but do not include it at runtime
compileOnly(fg.deobf("mezz.jei:jei-1.19.2-common-api:11.2.0.246"))
compileOnly(fg.deobf("mezz.jei:jei-1.19.2-forge-api:11.2.0.246"))
// at runtime, use the full JEI jar for Forge
runtimeOnly(fg.deobf("mezz.jei:jei-1.19.2-forge:11.2.0.246"))
runtimeOnly fg.deobf("top.theillusivec4.curios:curios-forge:1.19.2-5.1.3.0")
compileOnly fg.deobf("top.theillusivec4.curios:curios-forge:1.19.2-5.1.3.0:api")
runtimeOnly fg.deobf("top.theillusivec4.caelus:caelus-forge:1.19.2-3.0.0.6")
compileOnly fg.deobf("top.theillusivec4.caelus:caelus-forge:1.19.2-3.0.0.6:api")
compileOnly fg.deobf("vazkii.patchouli:Patchouli:1.19.2-77:api")
runtimeOnly fg.deobf("vazkii.patchouli:Patchouli:1.19.2-77")
implementation fg.deobf("curse.maven:clothconfig-348521:4633416")
implementation fg.deobf("curse.maven:architectuary-419699:4555749")
implementation fg.deobf("curse.maven:smartlib-661293:4458565")
implementation fg.deobf("curse.maven:terrablender-563928:4618490")
implementation fg.deobf("maven.modrinth:artifacts:5.0.4+forge")
implementation fg.deobf("curse.maven:placebo-283644:4876369")
implementation fg.deobf("curse.maven:apotheosis-313970:4876447")
implementation fg.deobf("curse.maven:deeperdarker-659011:4812297")
//magic mods
implementation fg.deobf("curse.maven:scriptor-817436:4549561")
implementation fg.deobf("curse.maven:hexcasting-569849:4166956")
implementation fg.deobf("curse.maven:paucal-597824:4100645")
implementation fg.deobf("curse.maven:kotlinforge-351264:4513187")
//implementation fg.deobf("curse.maven:ironspells-855414:4766218")
implementation fg.deobf("maven.modrinth:irons-spells-n-spellbooks:1.19.2-2.0.2-forge")
implementation fg.deobf("curse.maven:geckolib-388172:4407241")
implementation fg.deobf("curse.maven:playeranim-658587:4418149")
implementation fg.deobf("maven.modrinth:better-combat:1.7.1+1.19-forge")
//rubidium and oculus
implementation fg.deobf("curse.maven:oculus-581495:4578731")
implementation fg.deobf("curse.maven:rubidium-574856:4568727")
//LEGENDARY TOOLTIPS + DEPENDENCIES + EQUIPMENT COMPARE
implementation fg.deobf("curse.maven:iceberg-520110:4300529")
implementation fg.deobf("curse.maven:itemframes-532127:4278509")
implementation fg.deobf("curse.maven:prism-638111:3993293")
implementation fg.deobf("curse.maven:equipcompare-502561:4282005")
//TETRA
implementation fg.deobf("curse.maven:mutil-351914:3941314")
implementation fg.deobf("curse.maven:tetra-289712:4738567")
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
// Real mod deobf dependency examples - these get remapped to your current mappings
// compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api") // Adds JEI API as a compile dependency
// runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}") // Adds the full JEI mod as a runtime dependency
// implementation fg.deobf("com.tterrag.registrate:Registrate:MC${mc_version}-${registrate_version}") // Adds registrate as a dependency
}
mixin {
add sourceSets.main, "idf.mixin-refmap.json"
config 'idf.mixin.json'
}
// Example for how to get properties into the manifest for reading at runtime.
jar {
manifest {
attributes([
"Specification-Title" : "Improved Damage Framework",
"Specification-Vendor" : "cwjn",
"Specification-Version" : "1",
"Implementation-Title" : project.name,
"Implementation-Version" : project.jar.archiveVersion,
"Implementation-Vendor" : "cwjn",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"TweakClass": "org.spongepowered.asm.launch.MixinTweaker",
"TweakOrder": 0,
"MixinConfigs" : "idf.mixin.json"
])
}
}
// Example configuration to allow publishing using the maven-publish plugin
// This is the preferred method to reobfuscate your jar file
jar.finalizedBy('reobfJar')
// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing
// publish.dependsOn('reobfJar')
publishing {
publications {
mavenJava(MavenPublication) {
artifact jar
}
}
repositories {
maven {
url "file://${project.projectDir}/mcmodsrepo"
}
}
}