-
Notifications
You must be signed in to change notification settings - Fork 22
/
build.gradle
177 lines (158 loc) · 5.75 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
import org.jetbrains.gradle.ext.Gradle
plugins {
id 'java'
id 'java-library'
id 'maven-publish'
id 'org.jetbrains.gradle.plugin.idea-ext' version '1.1.7'
id 'com.gtnewhorizons.retrofuturagradle' version '1.3.24'
}
version = project.mod_version
group = project.maven_group
archivesBaseName = project.archives_base_name
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
vendor.set(org.gradle.jvm.toolchain.JvmVendorSpec.AZUL)
}
withSourcesJar()
}
minecraft {
mcVersion = '1.12.2'
def args = ["-ea:${project.group}"]
args << '-Dfml.coreMods.load=' + coremod_plugin_class_name
args << '-Dmixin.hotSwap=true'
args << '-Dmixin.checks.interfaces=true'
args << '-Dmixin.debug.export=true'
extraRunJvmArguments.addAll(args)
useDependencyAccessTransformers = true
injectedTags.put("ID", project.archives_base_name)
injectedTags.put("VERSION", project.version)
}
tasks.injectTags.configure {
outputClassName.set("com.cleanroommc.multiblocked.Tags")
}
repositories {
maven {
url = 'https://maven.cleanroommc.com'
}
maven {
url 'https://cfa2.cursemaven.com'
}
maven {
url 'https://cursemaven.com'
}
maven { // CraftTweaker
url = 'https://maven.blamejared.com/'
}
maven {
url 'https://dvs1.progwml6.com/files/maven/'
}
maven {
url 'https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/'
}
maven {
url 'https://maven.hellfiredev.net/'
}
maven {
url 'https://modmaven.dev/'
}
}
dependencies {
String mixin = modUtils.enableMixins('zone.rong:mixinbooter:8.6')
api (mixin) {
transitive = false
}
annotationProcessor 'org.ow2.asm:asm-debug-all:5.2'
annotationProcessor 'com.google.guava:guava:32.1.2-jre'
annotationProcessor 'com.google.code.gson:gson:2.8.9'
annotationProcessor (mixin) {
transitive = false
}
implementation 'software.bernie.geckolib:forge-1.12.2-geckolib:3.0.21'
implementation 'CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-4.1.20.673'
implementation 'mezz.jei:jei_1.12.2:4.15.0.293'
implementation 'curse.maven:the-one-probe-245211:2667280'
// TODO: settings to enable at runtime for each lib
compileOnly 'curse.maven:ae2-extended-life-570458:4105092'
compileOnly 'curse.maven:baubles-227083:2518667'
compileOnly "curse.maven:botania-225643:3330934"
compileOnly 'curse.maven:codechicken-lib-1-8-242818:2779848'
compileOnly 'curse.maven:extra-utilities-225561:2678374'
compileOnly 'curse.maven:gregtech-ce-unofficial-557242:4527757'
compileOnly "curse.maven:lightningcraft-237422:2872478"
compileOnly 'curse.maven:mcmultipart-239431:2615930'
compileOnly 'curse.maven:mekanism-268560:2835175'
compileOnly 'curse.maven:nuclearcraft-overhauled-336895:5446445'
compileOnly 'curse.maven:qmd-362056:5681949'
compileOnly 'curse.maven:thaumcraft-223628:2629023'
compileOnly 'curse.maven:thaumic-jei-285492:2705304'
compileOnly 'curse.maven:prodigy-tech-297414:2769520'
compileOnly 'curse.maven:patchouli-306770:3162874'
compileOnly 'curse.maven:natures-aura-306626:2882138'
compileOnly 'curse.maven:project-e-226410:2702991'
compileOnly 'curse.maven:blood-magic-224791:2822288'
compileOnly 'curse.maven:guide-api-228832:2645992'
compileOnly 'curse.maven:embers-extended-life-936489:5077562'
compileOnly 'curse.maven:thaumic-augmentation-319441:3536155'
compileOnly 'curse.maven:mystical-mechanics-300742:3006392'
compileOnly 'me.desht.pneumaticcraft:pneumaticcraft-repressurized:1.12.2-0.11.9-384'
compileOnly 'hellfirepvp.astralsorcery:astralsorcery:1.12.2-1.10.23-v161'
runtimeOnly 'com.cleanroommc:strip-latest-forge-requirements:1.0'
}
def at = file("${projectDir}/src/main/resources/multiblocked_at.cfg")
tasks.deobfuscateMergedJarToSrg.accessTransformerFiles.from(at)
tasks.srgifyBinpatchedJar.accessTransformerFiles.from(at)
processResources {
// this will ensure that this task is redone when the versions change.
inputs.property 'version', project.version
inputs.property 'mcversion', project.minecraft.version
// replace stuff in mcmod.info, nothing else
filesMatching(['mcmod.info', 'pack.mcmeta']) { fcd ->
// replace version and mcversion
fcd.expand (
'version': project.version,
'mcversion': project.minecraft.version
)
}
rename '(.+_at.cfg)', 'META-INF/$1'
}
jar {
manifest {
def attribute_map = [:]
attribute_map['FMLCorePlugin'] = project.coremod_plugin_class_name
attribute_map['FMLCorePluginContainsFMLMod'] = true
attribute_map['ForceLoadAsMod'] = project.gradle.startParameter.taskNames[0] == "build"
attribute_map['FMLAT'] = 'multiblocked_at.cfg'
attributes(attribute_map)
}
}
idea {
module { inheritOutputDirs = true }
project { settings {
runConfigurations {
"1. Run Client"(Gradle) {
taskNames = ['runClient']
}
"2. Run Server"(Gradle) {
taskNames = ['runServer']
}
"3. Run Obfuscated Client"(Gradle) {
taskNames = ['runObfClient']
}
"4. Run Obfuscated Server"(Gradle) {
taskNames = ['runObfServer']
}
}
compiler.javac {
afterEvaluate {
javacAdditionalOptions = '-encoding utf8'
moduleJavacAdditionalOptions = [
(project.name + ".main"): tasks.compileJava.options.compilerArgs.collect { '"' + it + '"' }.join(' ')
]
}
}
}}
}
tasks.named("processIdeaSettings").configure {
dependsOn("injectTags")
}