-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbuild.gradle
More file actions
executable file
·197 lines (173 loc) · 5.53 KB
/
build.gradle
File metadata and controls
executable file
·197 lines (173 loc) · 5.53 KB
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
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 { // The repo from which to get waila
name "Mobius Repo"
url "http://mobiusstrip.eu/maven"
}
maven { // the repo from which to get NEI and stuff
name 'CB Repo'
url "http://chickenbones.net/maven/"
}
}
apply plugin: 'forge'
apply plugin: 'maven'
project.ext {
major = "0"
minor = "2"
mcVersion = "1.7.10"
}
version = "${project.ext.major}.${project.minor}"
group = "uk.co.qmunity.lib"
archivesBaseName = "QmunityLib"
if (System.getenv().BUILD_NUMBER != null) {
version += ".${System.getenv().BUILD_NUMBER}"
} else {
version += " - err"
}
def grabDep(url) {
ant.get(src: url, dest: 'dep')
compile files("dep/" + url.substring(url.lastIndexOf("/")));
}
dependencies {
def f = new File('dep/')
if (f.exists()) {
f.delete()
}
f.mkdirs()
if (!f.exists()) {
f.mkdir()
}
println(" Adding dependencies!")
compile "codechicken:CodeChickenLib:1.7.10-1.1.3.138:dev"
// compile "codechicken:CodeChickenCore:1.7.10-1.0.2.11:dev"
//compile "codechicken:NotEnoughItems:1.7.10-1.0.2.26:dev"
compile "codechicken:ForgeMultipart:1.7.10-1.2.0.344:dev"
// compile "mcp.mobius.waila:Waila:1.5.3a_1.7.10"
println(" Finished adding dependencies!")
}
minecraft {
version = "${project.ext.mcVersion}-10.13.0.1208"
runDir = "eclipse/assets"
// replacing stuff in the source
replace '@MAJOR@', project.major
replace '@MINOR@', project.minor
replace '@MC_VERSION@', version
if (System.getenv("BUILD_NUMBER") != null) {
replace '@BUILD_NUMBER@', System.getenv("BUILD_NUMBER")
} else {
replace '@BUILD_NUMBER@', 0
}
}
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 '*.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 {
appendix = "${project.ext.mcVersion}"
classifier = "universal"
}
task deobfJar(type: Jar) {
from(sourceSets.main.output) {
appendix = "${project.ext.mcVersion}"
classifier = "deobf"
}
}
// add a source jar
task sourceJar(type: Jar) {
from (sourceSets.main.allSource) {
appendix = "${project.ext.mcVersion}"
classifier = "sources"
}
}
artifacts {
archives sourceJar
archives deobfJar
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: "file://" + System.getenv("local_maven"))
pom {
groupId = "qmunity"
version = project.version
artifactId = project.archivesBaseName
project {
name project.archivesBaseName
packaging 'jar'
description 'Qmunitylib'
url 'https://github.com/Qmunity/QmunityLib'
scm {
url 'https://github.com/Qmunity/QmunityLib'
connection 'scm:git:git@github.com:Qmunity/QmunityLib.git'
developerConnection 'scm:git:git@github.com:Qmunity/QmunityLib.git'
}
issueManagement {
system 'github'
url 'https://github.com/Qmunity/QmunityLib/issues'
}
licenses {
license {
name 'GPLv3'
url 'https://github.com/Qmunity/QmunityLib/blob/master/LICENCE.txt'
distribution 'repo'
}
}
developers {
developer {
id 'MineMaarten'
name 'MineMaarten'
roles { role 'developer' }
}
developer {
id 'Amadornes'
name 'Amadornes'
roles { role 'developer' }
}
developer {
id 'Quetzi'
name 'Quetzi'
roles { role 'developer' }
}
developer {
id 'K4Unl'
name 'K4Unl'
roles { role 'developer' }
}
developer {
id 'Zness'
name 'Zness'
roles { role 'artist' }
}
}
}
}
}
}
}