forked from BrassGoggledCoders/Steamcraft2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
185 lines (161 loc) · 5.48 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
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'
}
}
repositories {
maven {
name "K4Repo"
url "http://maven.k-4u.nl"
}
maven {
name = "ic2"
url = "http://maven.ic2.player.to/"
}
ivy {
name = 'ThaumCraft 4 API'
artifactPattern 'https://dl.dropboxusercontent.com/u/47135879/[module](-[classifier])-1.7.10-[revision](.[ext])'
}
maven {
name "RX14"
url "http://mvn.rx14.co.uk/repo/"
}
maven {
name "Tterrag"
url "http://maven.tterrag.com"
}
}
apply plugin: 'forge'
project.ext {
buildNum = System.getenv("BUILD_NUMBER")
mcVersion = "1.7.10"
}
version = project.ext.mcVersion + "-B4.5." + project.ext.buildNum
group= "brassgoggledcoders" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "steamcraft2"
minecraft {
version = "${project.ext.mcVersion}-10.13.4.1490-${project.ext.mcVersion}"
runDir = "eclipse"
}
dependencies {
compile "brassgoggledcoders:boilerplate:1.7.10-6.0.0.+:deobf"
compile 'com.mod-buildcraft:buildcraft:6.4.16:dev'
compile 'net.industrial-craft:industrialcraft-2:2.2.727-experimental:api'
compile 'Azanor:Thaumcraft:4.2.3.5:deobf@jar'
compile 'team.chisel:Chisel:2.9.0.3:deobf'
compile 'team.chisel.ctmlib:CTMLib:MC1.7.10-1.3.0.2:deobf'
compile name: "Botania", group: "vazkii.botania", version: "r1.6-190.6", classifier: "deobf"
compile files("libs/Railcraft_1.7.10-9.7.0.0-dev.jar")
}
task getLibraries {
def libsFolder = new File('libs')
if (!libsFolder.isDirectory()) {
libsFolder.mkdirs()
}
def railcraftSource = 'https://dl.dropboxusercontent.com/u/38558957/Minecraft/Railcraft/Railcraft_1.7.10-9.7.0.0-dev.jar'
def railcraftDest = new File('libs', 'Railcraft_1.7.10-9.7.0.0-dev.jar')
if(!railcraftDest.exists()){
railcraftDest.withOutputStream { out ->
new URL(railcraftSource).withInputStream { from -> out << from; }
}
}
}
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':project.version, 'mcversion':project.minecraft.version
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
jar {
classifier = "universal"
}
task deobfJar(type: Jar) {
from(sourceSets.main.output) {
classifier = "deobf"
}
}
// Create API library zip
task apiZip(type: Zip) {
from(sourceSets.main.java) {
include 'steamcraft/api/**'
destinationDir = file 'output'
classifier = "api"
}
}
apiZip.mustRunAfter deobfJar
artifacts {
archives deobfJar
}
task("uploadJars", dependsOn: "reobf") {
description = "uploads JARs"
if (System.getenv("local_maven") != null) {
apply plugin: 'maven'
uploadArchives {
repositories {
mavenDeployer {
repository(url: "file://" + System.getenv("local_maven"))
pom {
groupId = project.group
version = project.version
artifactId = project.archivesBaseName
project {
name project.archivesBaseName
packaging 'jar'
description 'SteamCraft2'
url ''
scm {
url 'https://github.com/BrassGoggledCoders/SteamCraft2'
connection 'scm:git:[email protected]:BrassGoggledCoders/SteamCraft2.git'
developerConnection 'scm:git:[email protected]:BrassGoggledCoders/SteamCraft2.git'
}
issueManagement {
system 'github'
url 'https://github.com/BrassGoggledCoders/SteamCraft2/issues'
}
licenses {
license {
name 'MMPL'
url 'https://github.com/BrassGoggledCoders/SteamCraft2/blob/master/LICENSE'
distribution 'repo'
}
}
developers {
developer {
id 'warlordjones'
name 'warlordjones'
roles { role 'developer' }
//TODO
}
}
}
}
}
}
}
}
}
configurations.all {
// check for updates every build
resolutionStrategy.cacheDynamicVersionsFor 0, 'seconds'
}