-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
193 lines (163 loc) · 5.6 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
import org.apache.commons.io.FileUtils
import org.apache.commons.io.filefilter.FileFilterUtils
import org.apache.commons.io.filefilter.TrueFileFilter
buildscript {
repositories {
mavenCentral()
jcenter()
maven { url = "https://files.minecraftforge.net/maven" }
maven { url = "https://repo.spongepowered.org/maven" }
}
dependencies {
classpath "net.minecraftforge.gradle:ForgeGradle:4.+"
classpath "org.spongepowered:mixingradle:0.7-SNAPSHOT"
}
}
apply plugin: "net.minecraftforge.gradle"
apply plugin: "org.spongepowered.mixin"
apply plugin: "idea"
apply plugin: "maven-publish"
version = "1.3"
group = "wormz.fatweaks"
compileJava.sourceCompatibility = compileJava.targetCompatibility = "1.8"
minecraft {
mappings channel: "stable", version: "39-1.12"
runs {
client {
workingDirectory project.file("run")
// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'
jvmArgs "-Dfml.coreMods.load=wormz.fatweaks.ASM.FATCore,zone.rong.mixinbooter.MixinBooterPlugin"
mods {
fatweaks {
source sourceSets.main
}
}
}
server {
// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'
jvmArgs "-Dfml.coreMods.load=wormz.fatweaks.ASM.FATCore,zone.rong.mixinbooter.MixinBooterPlugin"
mods {
fatweaks {
source sourceSets.main
}
}
}
}
}
repositories {
maven {
name = "jei"
url = "http://dvs1.progwml6.com/files/maven"
}
maven {
name = "ic2"
url = "http://maven.ic2.player.to"
}
maven {
name = "jared"
url = "http://maven.blamejared.com"
}
maven {
url "http://maven.tterrag.com/"
}
maven {
url "https://www.cursemaven.com"
content {
includeGroup "curse.maven"
}
}
}
dependencies {
minecraft "net.minecraftforge:forge:1.12.2-14.23.5.2854"
implementation "org.spongepowered:mixin:0.8.+"
annotationProcessor "org.spongepowered:mixin:0.8.+:processor"
implementation "curse.maven:mixinBooter-419286:3109196"
implementation "net.industrial-craft:industrialcraft-2:2.8.202-ex112"
implementation "curse.maven:industrialWires-251121:2664750"
implementation "curse.maven:advancedMachines-251205:2667002"
implementation fg.deobf("curse.maven:customOreGen-237130:2568549")
implementation "curse.maven:JustEnoughResources-240630:2728585"
implementation "curse.maven:magneticraft-224808:2935936"
runtimeOnly "curse.maven:forgelin-248453:2785465"
runtimeOnly "curse.maven:modelloader-277663:2744735"
runtimeOnly "blusunrize:ImmersiveEngineering:0.12-+"
runtimeOnly "mezz.jei:jei_1.12.2:4.15.0.293"
runtimeOnly "mcjty.theoneprobe:TheOneProbe-1.12:1.12-1.4.28-17"
}
mixin {
add sourceSets.main, "main.refmap.json"
}
jar {
manifest {
attributes([
"Specification-Title" : "SmallFix,FATweaker",
"Specification-Vendor" : "Windmill_City,Wormzjl",
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.name,
"Implementation-Version" : "${version}",
"Implementation-Vendor" : "Windmill_City,Wormz",
"Implementation-Timestamp" : new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"FMLCorePlugin" : "wormz.fatweaks.ASM.FATCore",
"FMLCorePluginContainsFMLMod": true,
"ForceLoadAsMod" : true
])
}
}
jar.finalizedBy("reobfJar")
class MakeATsTask extends DefaultTask {
@Input
FileCollection runtimeLibraries
@OutputDirectories
File dirATs
String FILENAME_AT = "accesstransformer.cfg"
MakeATsTask() {
runtimeLibraries = project.configurations["runtimeClasspath"].filter {
!it.name.startsWith("forge")
}
dirATs = new File("$project.buildDir/generatedATs")
}
@TaskAction
def makeAT() {
project.delete(dirATs)//Clean first
runtimeLibraries.forEach {
project.zipTree(it).filter { content ->
content.name.endsWith("_at.cfg")
}.forEach { at ->
println("Found AccessTransFormer: ${at.name} in ${it.name}")
project.copy {
from(at)
into(project.file("$dirATs/${at.name.substring(0, at.name.lastIndexOf("."))}"))
rename {
FILENAME_AT
}
}
}
}
}
}
task "transformAccessTransformer"(type: MakeATsTask) {
group = "access_transformer"
if (dirATs.exists())
minecraft.accessTransformers.addAll(FileUtils.listFiles(
dirATs,
FileFilterUtils.nameFileFilter(FILENAME_AT),
TrueFileFilter.INSTANCE))
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact jar
}
}
repositories {
maven {
url "file:///${project.projectDir}/mcmodsrepo"
}
}
}