forked from Nukepowered/GregTech4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
138 lines (124 loc) · 3.66 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
buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "https://maven.minecraftforge.net/"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath ('com.anatawa12.forge:ForgeGradle:1.2-1.0.+') {
changing = true
}
}
}
apply plugin: 'forge'
apply plugin: 'java'
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
compileTestJava.enabled = false
sourceCompatibility = targetCompatibility = '1.8'
compileJava {
sourceCompatibility = targetCompatibility = '1.8'
}
version = "v417.57"
group = "gregtechmod"
archivesBaseName = "gregtechmod"
minecraft {
version = "${mc_ver}-${forge_ver}-${mc_ver}"
runDir = "eclipse"
replace("@VERSION@", getValidVersion())
replace("public static volatile int VERSION = 417",
"public static volatile int VERSION = " + getValidVersion().replace('.', ''))
includes.addAll([
"GT_Mod.java",
"GregTech_API.java",
"BaseMetaTileEntity.java",
"BaseMetaPipeEntity.java",
"MetaTileEntity.java",
"MetaPipeEntity.java",
"GT_CircuitryBehavior.java",
"GT_CoverBehavior.java",
"GT_Config.java",
"GT_LanguageManager.java",
"GT_ModHandler.java",
"GT_OreDictUnificator.java",
"Recipe.java",
"GT_Utility.java",
"GT_RecipeRegistrator.java",
"Element.java",
"Materials.java",
"OrePrefixes.java"
])
}
repositories {
maven {
url = "https://gregtech.overminddl1.com/"
}
maven {
name = "ChickenBones maven"
url = "http://chickenbones.net/maven/"
}
maven {
name = "forge"
url = "https://maven.minecraftforge.net/"
}
maven {
name = "cil"
url = "https://maven.cil.li/"
}
maven {
name = "buildcraft"
url = "https://mod-buildcraft.com/maven/"
}
maven {
name = "blamejared maven"
url = "https://maven.blamejared.com/"
}
}
jar {
manifest {
attributes 'FMLAT': 'gregtech_at.cfg'
attributes 'FMLCorePluginContainsFMLMod': 'true'
attributes 'FMLCorePlugin': 'gregtechmod.common.asm.GT_CoreMod'
}
}
dependencies {
compile "codechicken:CodeChickenCore:${mc_ver}-${ccc_version}:dev"
compile "codechicken:NotEnoughItems:${mc_ver}-${nei_version}:dev"
compile "codechicken:CodeChickenLib:${mc_ver}-${ccl_version}:dev"
compile "net.sengir.forestry:forestry_${mc_ver}:${forestry_ver}:dev"
compile "net.industrial-craft:industrialcraft-2:${ic2_ver}-experimental:dev"
compile "MineTweaker3:MineTweaker3-MC1710-Main:${mc_ver}-${ct_version}" // CraftTweaker (MineTweaker3)
compile files("libs/CoFHCore-[1.7.10]3.1.4-329-dev.jar")
compile files("libs/ThermalDynamics-[1.7.10]1.2.1-172-dev.jar")
compile files("libs/ThermalExpansion-[1.7.10]4.1.5-248-dev.jar")
compile files("libs/ThermalFoundation-[1.7.10]1.2.6-118-dev.jar")
compile files("libs/Railcraft_1.7.10-9.12.2.1-dev.jar")
compile files("libs/MineFactoryReloaded-[1.7.10]2.8.1-174-dev.jar")
}
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
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
expand 'version': getValidVersion(), 'mcversion':project.minecraft.version
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
def getValidVersion() {
def version = new StringBuilder(project.version.toString())
version.deleteCharAt(0)
version.insert(1, '.')
return version.toString()
}