-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathbuild.gradle
189 lines (160 loc) · 5.93 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
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id 'eclipse'
id 'maven-publish'
id 'net.minecraftforge.gradle' version '5.1.+'
id 'wtf.gofancy.fancygradle' version '1.1.+'
}
fancyGradle {
patches {
resources
coremods
codeChickenLib
asm
mergetool
}
}
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
version = mod_version
group = mod_group
archivesBaseName = mod_archives_name + '-' + mc_version
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
}
minecraft {
// the mappings can be changed at any time, and must be in the following format.
// snapshot_YYYYMMDD snapshot are built nightly.
// stable_# stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not always work.
// simply re-run your setup task after changing the mappings to update your workspace.
mappings channel: 'stable', version: '39-1.12'
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
//replace '@VERSION@', project.version
// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
// Default run configurations.
// These can be tweaked, removed, or duplicated as needed.
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=com.github.vfyjxf.nee.asm.NEELoadingPlugin"
}
server {
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=com.github.vfyjxf.nee.asm.NEELoadingPlugin"
}
}
}
// Include resources generated by data generators.
sourceSets.main.resources { srcDir 'src/generated/resources' }
repositories {
maven {
// location of the maven that hosts JEI files
name = "Progwml6 maven"
url = "https://dvs1.progwml6.com/files/maven/"
}
maven {
// location of a maven mirror for JEI files, as a fallback
name = "ModMaven"
url = "https://modmaven.k-4u.nl"
}
maven {
name = "covers Maven"
url = "https://maven.covers1624.net"
}
maven {
name = "CurseMaven"
url = "https://www.cursemaven.com"
}
maven { url = "https://maven.cil.li/" }
flatDir {
dirs 'libs'
}
}
dependencies {
minecraft 'net.minecraftforge:forge:1.12.2-14.23.5.2860'
compileOnly fg.deobf("mezz.jei:jei_${mc_version}:${jei_version}")
runtimeOnly fg.deobf("mezz.jei:jei_${mc_version}:${jei_version}")
// compile "curse.maven:modularui-624243:3895901"
//AE2 Unofficial Extended Life
// compileOnly fg.deobf("curse.maven:ae2-extended-life-570458:4463434")
compileOnly fg.deobf("curse.maven:applied-energistics-2-223794:2747063")
runtimeOnly fg.deobf("curse.maven:applied-energistics-2-223794:2747063")
compileOnly "curse.maven:wireless-crafting-terminal-244559:2830252"
compileOnly "curse.maven:ae2wtlib-304024:2830114"
compileOnly "curse.maven:p455w0rds-library-255232:2830265"
runtimeOnly "curse.maven:wireless-crafting-terminal-244559:2830252"
runtimeOnly "curse.maven:ae2wtlib-304024:2830114"
runtimeOnly "curse.maven:p455w0rds-library-255232:2830265"
// deobfCompile "p455w0rd:WirelessCraftingTerminal:1.12.2-3.12.97"
// deobfCompile "p455w0rd:AE2WTLib:1.12.2-1.0.34"
// deobfCompile "p455w0rd:p455w0rdslib:1.12.2-2.3.161"
//Big orediect test
compileOnly fg.deobf("CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-4.1.20.680")
}
jar.finalizedBy('reobfJar')
processResources {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version': project.version,
'mod_id': mod_id,
'mod_name': mod_name,
'mod_credits': mod_credits,
'mod_author': mod_author,
'mod_description': mod_description,
'mc_version': mc_version,
'mod_version': mod_version,
'mod_logo': mod_logo
}
// copy everything else except the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
// workaround for userdev bug
tasks.create("copyResourceToClasses", Copy.class) {
tasks.classes.dependsOn(it)
dependsOn(tasks.processResources)
onlyIf { gradle.taskGraph.hasTask(tasks.prepareRuns) }
into("$buildDir/classes/java/main")
// if you write @Mod class in kotlin, please use code below
// into("$buildDir/classes/kotlin/main")
from(tasks.processResources.destinationDir)
}
jar {
manifest.attributes(
'FMLAT': 'neenergistics_at.cfg',
'FMLCorePlugin': 'com.github.vfyjxf.nee.asm.NEELoadingPlugin',
'FMLCorePluginContainsFMLMod': 'true'
)
}
//task devJar(type: Jar) {
// classifier = 'dev'
// from sourceSets.main.output
//}
//
//task sourcesJar(type: Jar) {
// classifier = 'sources'
// from sourceSets.main.allSource
//}
//
//artifacts {
// archives devJar
// archives sourcesJar
//}