forked from TechReborn/TechReborn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
245 lines (216 loc) · 7 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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
}
}
apply plugin: 'forge'
apply plugin: 'maven'
apply plugin: 'maven-publish'
sourceCompatibility = 1.7
targetCompatibility = 1.7
repositories {
maven {
name = "ic2"
url = "http://maven.ic2.player.to/"
}
maven {
name "Mobius Repo"
url "http://mobiusstrip.eu/maven"
}
maven {
name 'CB Repo'
url "http://chickenbones.net/maven/"
}
maven {
name = "Modmuss50"
url = "http://maven.modmuss50.me/"
}
maven {
name = "Qmunity"
url = "http://maven.bluepowermod.com/"
}
ivy {
name "BuildCraft"
artifactPattern "http://www.mod-buildcraft.com/releases/BuildCraft/[revision]/[module]-[revision]-[classifier].[ext]"
}
maven {
name "TiC"
url "http://dvs1.progwml6.com/files/maven"
}
ivy {
name = 'ThaumCraft 4 API'
artifactPattern 'https://dl.dropboxusercontent.com/u/47135879/[module](-[classifier])-1.7.10-[revision](.[ext])'
}
ivy {
name "MineTweaker3"
artifactPattern "http://minetweaker3.powerofbytes.com/download/[module]-[classifier]-[revision].[ext]"
}
}
configurations {
shade
compile.extendsFrom shade
}
def ENV = System.getenv()
if (ENV.BUILD_NUMBER) {
version = "0.7.2." + "${System.getenv().BUILD_NUMBER}"
} else {
version = "0.7.2.BUILD"
}
minecraft {
version = "1.7.10-10.13.4.1448-1.7.10"
replace "@MODVERSION@", project.version
}
group = 'TechReborn'
task deleteOldArtifacts(type: Delete) {
delete 'build/libs'
}
classes.dependsOn deleteOldArtifacts
def grabDep(name, url) {
ant.get(src: url, dest: 'dep')
file("dep/" + url.substring(url.lastIndexOf("/"))).renameTo(file("dep/" + name + ".jar"))
}
dependencies {
def f = new File('dep/')
if (!f.exists()) {
f.mkdirs()
}
if (!f.exists()) {
f.mkdir()
}
compile 'net.industrial-craft:industrialcraft-2:2.2.796-experimental:dev'
shade 'net.industrial-craft:industrialcraft-2:2.2.796-experimental:api'
compile "codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev"
compile "codechicken:CodeChickenCore:1.7.10-1.0.7.+:dev"
compile "codechicken:NotEnoughItems:1.7.10-1.0.5.+:dev"
compile "codechicken:ForgeMultipart:1.7.10-1.2.0.345:dev"
compile ("mcp.mobius.waila:Waila:1.5.10_1.7.10:dev") {
exclude group: 'mcp.mobius.waila'
}
compile name: 'buildcraft', version: '7.1.13', classifier: "dev", ext: 'jar'
compile "qmunity:QmunityLib:0.2.+:deobf"
compile "com.pahimar.ee3:EquivalentExchange3:1.7.10-0.3.507:dev"
compile "net.sengir.forestry:forestry_1.7.10:4.2.0.47:dev"
shade "net.sengir.forestry:forestry_1.7.10:4.2.0.47:api"
compile "tconstruct:TConstruct:1.7.10-1.8.8.build988:deobf"
compile "mods.natura:natura:1.7.10-107.779621d:deobf"
compile "mantle:Mantle:1.7.10-0.3.2.jenkins192:deobf"
compile "com.github.glitchfiend.biomesoplenty:BiomesOPlenty:1.7.10-2.1.0.1465:deobf"
compile 'Azanor:Thaumcraft:4.2.3.5:deobf@jar'
compile "com.github.azanor:baubles:1.0.1.10:deobf@jar"
compile name: "MineTweaker3", version: "1.7.10-3.0.9C", classifier: "Dev"
shade 'IC2-Classic-API-STANDALONE:IC2-Classic-API-STANDALONE:1.1.0.19-5:api'
compile 'RebornCore:RebornCore:1.1.0.+:dev'
testCompile 'junit:junit:4.12'
}
processResources
{
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
// ${version} and ${mcversion} are the exact strings being replaced
expand 'version':project.version, 'mcversion':project.minecraft.version
}
// copy everything else, that's not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
task sourceJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'src'
}
task deobfJar(type: Jar) {
from sourceSets.main.output
exclude "**/*.psd"
classifier = 'dev'
}
jar {
exclude "**/*.psd"
classifier = 'universal'
configurations.shade.each { dep ->
from(project.zipTree(dep)){
include 'ic2/api/'
include 'forestry/api/fuels/'
exclude 'META-INF', 'META-INF/**', '**/*.java'
}
}
}
task apiJar(type: Jar) {
from sourceSets.main.allSource
from sourceSets.main.output
include 'techreborn/api/**/*'
classifier = "api"
}
javadoc {
source += sourceSets.api.allSource
include 'techreborn/api/**/*'
}
apiJar.mustRunAfter deobfJar
artifacts {
archives sourceJar
archives deobfJar
archives apiJar
}
build.dependsOn sourceJar, deobfJar, apiJar
uploadArchives {
repositories {
mavenDeployer {
repository(url: "file:///var/www/maven/")
pom {
groupId = "TechReborn"
version = project.version
artifactId = project.archivesBaseName
project {
name project.archivesBaseName
packaging 'jar'
description 'TechReborn'
url 'https://github.com/TechReborn/TechReborn'
scm {
url 'https://github.com/TechReborn/TechReborn'
connection 'scm:git:[email protected]:TechReborn/TechReborn.git'
developerConnection 'scm:git:[email protected]:TechReborn/TechReborn.git'
}
issueManagement {
system 'github'
url 'https://github.com/TechReborn/TechReborn/issues'
}
licenses {
license {
name 'License'
url 'https://raw.githubusercontent.com/TechReborn/TechReborn/master/LICENSE.md'
distribution 'repo'
}
}
developers {
developer {
id 'modmuss50'
name 'modmuss50'
roles { role 'developer' }
}
developer {
id 'Gigabit101'
name 'Gigabit101'
roles { role 'developer' }
}
}
}
}
}
}
}
task wrapper(type: Wrapper) {
//To update the wrapper change the version bellow then run: gradle wrapper
gradleVersion = '2.9'
}