This repository has been archived by the owner on Jun 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
98 lines (84 loc) · 2.29 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
buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
maven {
url = "https://repo.spongepowered.org/maven"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT'
}
}
configurations {
includeMod
shade
shadeClient
serverLib
buildDep
compile.extendsFrom buildDep, shade, shadeClient, serverLib
}
repositories {
flatDir {
dirs 'lib'
}
maven {
name = "sponge"
url = "https://repo.spongepowered.org/maven/"
}
}
apply plugin: 'forge'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
version = "1.11"
group = "ic2energyfix"
archivesBaseName = "ic2energyfix"
sourceCompatibility = targetCompatibility = '1.8'
compileJava {
sourceCompatibility = targetCompatibility = '1.8'
}
minecraft {
version = "1.7.10-10.13.4.1614-1.7.10"
runDir = "run"
}
dependencies {
compile name: 'industrialcraft-2-2.2.828-experimental-dev'
// Shade Mixin library
shade group: "org.spongepowered", name: "mixin", version: "0.6.15-SNAPSHOT", changing: true
shadeClient group: "org.spongepowered", name: "mixin", version: "0.6.15-SNAPSHOT", changing: true
}
// Configure server resource processing
project.processResources {
from(sourceSets.main.resources.srcDirs) {
include "mcmod.info"
expand(
"version": project.version,
"mcversion": project.minecraft.version,
)
}
}
def refMap = "${tasks.compileJava.temporaryDir}" + File.separator + "mixins.ic2energyfix.refmap.json"
jar {
from refMap
manifest {
attributes 'FMLCorePlugin': 'com.eric0210.ic2energyfix.IC2EnergyFix'
attributes 'FMLCorePluginContainsFMLMod': 'false'
attributes 'TweakClass': 'org.spongepowered.asm.launch.MixinTweaker'
attributes 'MixinConfigs': "mixins.ic2energyfix.json"
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
configurations.shade.copyRecursive().setTransitive(false).each { artifact ->
from(zipTree(artifact))
}
}
def mixinSrg = "${tasks.reobf.temporaryDir}" + File.separator + "mixins.srg"
afterEvaluate {
tasks.compileJava.options.compilerArgs += ["-AreobfSrgFile=${tasks.reobf.srg}", "-AoutSrgFile=${mixinSrg}", "-AoutRefMapFile=${refMap}"]
}