forked from GTNewHorizons/NewHorizonsCoreMod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
223 lines (203 loc) · 6.57 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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
import java.util.concurrent.TimeUnit
import java.util.Properties
import groovy.util.ConfigSlurper
buildscript {
repositories {
mavenCentral()
jcenter()
maven {
name = "gt"
url = "https://gregtech.overminddl1.com/"
}
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "jitpack"
url = "https://jitpack.io"
}
}
dependencies {
classpath "com.github.GTNH2:ForgeGradle:FG_1.2-SNAPSHOT"
}
}
plugins {
id("org.ajoberstar.grgit") version("3.1.1")
}
apply plugin: "java"
apply plugin: "idea"
apply plugin: "forge"
apply plugin: "signing"
idea {
module {
inheritOutputDirs = true
downloadJavadoc = true
downloadSources = true
}
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
file "build.properties" withReader {
def prop = new Properties()
prop.load(it)
ext.config = new ConfigSlurper().parse prop
}
version = "${config.coremod.version}"
group = "com.dreammaster"
archivesBaseName = "GTNewHorizonsCoreMod"
minecraft {
version = "${config.minecraft.version}-${config.forge.version}-${config.minecraft.version}"
runDir = "eclipse"
replaceIn "src/main/java/com/dreammaster/lib/Refstrings.java"
replace "GRADLETOKEN_VERSION", ((String) project.version).split("-")[1]
}
repositories {
maven {
name = "UsrvDE"
url = "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases/"
}
maven { // Baubles
name = "UsrvDE_3rdParty"
url = "http://jenkins.usrv.eu:8081/nexus/content/repositories/thirdparty/"
}
maven {
name = "chickenbones"
url = "http://chickenbones.net/maven/"
}
maven {
name = "gt"
url = "https://gregtech.overminddl1.com/"
}
maven { // TConstruct
name = 'DVS1 Maven FS'
url = 'http://dvs1.progwml6.com/files/maven'
}
maven {
url = "http://maven.ic2.player.to/"
name = "ic2"
}
maven {
url = "http://www.ryanliptak.com/maven/"
name = "applecore"
}
maven {
url = "http://maven.cil.li/"
name = "OpenComputers"
}
maven {
name = "jitpack"
url = "https://jitpack.io"
}
ivy {
name = "gtnh_download_source"
artifactPattern("http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]-[revision].[ext]")
}
ivy {
name = "gtnh_download_source_stupid_underscore_typo"
artifactPattern("http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]_[revision].[ext]")
}
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor(0, TimeUnit.SECONDS)
setTransitive(false)
}
dependencies {
compile "eu.usrv:YAMCore:${config.minecraft.version}-${config.yamcore.version}:deobf"
compile "com.azanor.baubles:Baubles:${config.baubles.version}:deobf"
compile ("appeng:appliedenergistics2:${config.ae2.version}:api") {
exclude module: "*"
}
compile "applecore:AppleCore:${config.applecore.version}:deobf"
compile "codechicken:CodeChickenLib:${config.minecraft.version}-${config.codechickenlib.version}:dev"
compile "codechicken:CodeChickenCore:${config.minecraft.version}-${config.codechickencore.version}:dev"
compile "codechicken:NotEnoughItems:${config.minecraft.version}-${config.nei.version}:dev"
compile "net.industrial-craft:industrialcraft-2:${config.ic2.version}:dev"
compile ("com.enderio:EnderIO:${config.minecraft.version}-${config.enderio.version}:dev") {
exclude group: "mcp.mobius.waila"
}
compile "com.enderio.core:EnderCore:${config.minecraft.version}-${config.endercore.version}:dev"
compile "thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev"
//downloads.gtnewhorizons.com
compile ":HardcoreEnderExpansion:MC-1.7.10_v1.8.6"
compile ":Railcraft:1.7.10-9.12.2.0:dev"
compile ":GT-PlusPlus:1.7.05.53"
compile ":twilightforest:1.7.10-2.3.8.5-dev-deobf"
compile ":WitcheryExtras:1.0.1-dev"
compile ":witchery:1.7.10-0.24.1:deobf"
//jitpack
compile("com.github.GTNewHorizons:GT5-Unofficial:experimental-SNAPSHOT:dev") {
setChanging(true)
}
compile "com.github.GTNewHorizons:StructureLib:1.0.6:deobf"
compile("com.github.GTNewHorizons:TinkersConstruct:master-SNAPSHOT:deobf") {
setChanging(true)
}
compile("mantle:Mantle:1.7.10-0.3.2.jenkins207:deobf")
compile("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-1.7.10-SNAPSHOT:dev") {
setChanging(true)
}
compile("com.github.GTNewHorizons:ForestryMC:GTNH-Fixes-SNAPSHOT:dev") {
setChanging(true)
}
compile("com.github.GTNewHorizons:GalacticGregGT5:master-SNAPSHOT") {
setChanging(true)
}
compile("com.github.GTNewHorizons:bartworks:master-SNAPSHOT:dev") {
setChanging(true)
}
compile fileTree(dir: "libs", include: "*.jar")
}
processResources
{
def cleanVersion = ((String) project.version).split("-")[1]
// this will ensure that this task is redone when the versions change.
inputs.property "version", cleanVersion
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":cleanVersion, "mcversion":project.minecraft.version
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude "mcmod.info"
}
}
task devJar(type: Jar) {
from sourceSets.main.output
getArchiveClassifier().set("dev")
manifest {
attributes "FMLCorePlugin": "com.dreammaster.coremod.DepLoader","FMLCorePluginContainsFMLMod": "true"
}
}
task sourceJar(type: Jar) {
from sourceSets.main.allSource
getArchiveClassifier().set("sources")
}
artifacts {
archives devJar
archives sourceJar
}
task signJar(dependsOn: "reobf"){
doLast {
ant.signjar(
destDir: jar.getDestinationDirectory(),
jar: jar.getArchiveFile(),
alias: findProperty("keyStoreAlias") ?: "",
keystore: findProperty("keyStore") ?: "",
storepass: findProperty("keyStorePass") ?: "",
digestalg: findProperty("signDigestAlg") ?: "",
tsaurl: findProperty("signTSAurl") ?: "",
verbose: true
)
}
}
jar {
manifest {
attributes "FMLCorePlugin": "com.dreammaster.coremod.DreamCoreMod","FMLCorePluginContainsFMLMod": "true"
}
}