-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
250 lines (216 loc) · 6.92 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
246
247
248
249
250
buildscript {
repositories {
mavenCentral()
maven {
name = 'forge-repo'
url = 'http://files.minecraftforge.net/maven/'
}
maven {
name = 'sonatype-nexus'
url = 'https://oss.sonatype.org/content/repositories/public/'
}
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.0'
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0'
}
}
defaultTasks 'licenseFormat', 'build', 'install'
apply plugin: 'forge'
apply plugin: 'license'
apply plugin: 'maven'
apply plugin: 'com.github.johnrengelman.shadow'
group = 'com.almuradev'
archivesBaseName = 'almurasdk'
ext.name = 'AlmuraSDK'
ext.inceptionYear = '2015'
ext.packaging = 'jar'
ext.url = 'http://github.com/AlmuraDev/AlmuraSDK'
ext.organization = 'AlmuraDev'
ext.minecraftVersion = '1.7.10'
ext.forgeVersion = '10.13.4.1448'
ext.sdkVersion = '1'
version = minecraftVersion + '-' + forgeVersion.substring(forgeVersion.size() - 4) + '-' + sdkVersion + '-SNAPSHOT'
sourceCompatibility = '1.7'
targetCompatibility = '1.7'
repositories {
mavenLocal()
mavenCentral()
maven {
name = 'sonatype-nexus'
url = 'https://oss.sonatype.org/content/repositories/public/'
}
maven {
name = 'sponge-public'
url = 'http://repo.spongepowered.org/maven/'
}
}
minecraft {
version = project.ext.minecraftVersion + '-' + project.ext.forgeVersion + '-1.7.10'
mappings = 'stable_12'
runDir = "run/"
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
dependencies {
compile 'com.flowpowered:flow-math:1.0.2-SNAPSHOT'
compile 'net.malisis:malisiscore:1.7.10-0.12.10-SNAPSHOT:dev'
compile 'ninja.leaping.configurate:configurate-yaml:1.2'
compile('org.inspirenxe:simplesave:1.3.0-SNAPSHOT') {
transitive = true
}
compile 'org.spongepowered:mixin:0.1-SNAPSHOT'
compile 'org.yaml:snakeyaml:1.15'
}
shadowJar {
exclude 'META-INF/*.DSA'
exclude 'META-INF/*.RSA'
exclude 'net/minecraftforge/**'
dependencies {
include(dependency('com.alta189:simplesave:1.3.0-SNAPSHOT'))
include(dependency('com.flowpowered:flow-math'))
include(dependency('com.h2database:h2:1.4.188'))
include(dependency('mysql:mysql-connector-java:5.1.36'))
include(dependency('ninja.leaping.configurate:configurate-yaml'))
include(dependency('ninja.leaping.configurate:configurate-core'))
include(dependency('org.xerial:sqlite-jdbc:3.8.11.1'))
include(dependency('org.yaml:snakeyaml'))
}
classifier = ''
}
reobf.dependsOn shadowJar
processResources {
inputs.property "version", version
inputs.property "mcversion", project.minecraft.version
from 'LICENSE.txt'
}
license {
ext.name = project.name
ext.organization = project.organization
ext.url = project.url
ext.year = project.inceptionYear
sourceSets = project.sourceSets
header file('HEADER.txt')
ignoreFailures true
strictCheck true
includes(["**/*.java"])
mapping {
java = 'SLASHSTAR_STYLE'
}
}
def defaultEncoding = 'UTF-8'
compileJava {
options.compilerArgs += [
'-Xlint:all',
'-Xlint:-path',
'-Xlint:-processing'
]
options.deprecation = true
options.encoding = defaultEncoding
}
javadoc {
options.encoding = defaultEncoding
}
def manifestEntries = [
"Built-By" : System.properties['user.name'],
"Created-By" : System.properties['java.vm.version'] + " (" + System.properties['java.vm.vendor'] + ")",
"Implementation-Title" : name,
"Implementation-Version" : version,
"Implementation-Vendor" : url,
"FMLCorePlugin" : "com.almuradev.almurasdk.core.AlmuraSDKCoreMod",
"FMLCorePluginContainsFMLMod": 'true'
]
jar {
manifest.mainAttributes(manifestEntries)
}
task sourceJar(type: Jar, dependsOn: sourceMainJava) {
from "build/sources/java"
from "build/resources/main/java"
classifier = "sources"
}
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
classifier = "javadoc"
}
task deobfJar(type: Jar) {
from sourceSets.main.output
classifier = "dev"
}
if (JavaVersion.current().isJava8Compatible()) {
tasks.withType(Javadoc) {
// disable the crazy super-strict doclint tool in Java 8
options.addStringOption('Xdoclint:none', '-quiet')
}
}
artifacts {
archives sourceJar
archives javadocJar
archives deobfJar
}
uploadArchives {
repositories.mavenDeployer {
if (version.endsWith('-SNAPSHOT')) {
ext.sonatypeUrl = 'https://oss.sonatype.org/content/repositories/snapshots'
} else {
ext.sonatypeUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
signing {
required {isReleaseVersion && gradle.taskGraph.hasTask("uploadArchives")}
sign configurations.archives
beforeDeployment {
org.gradle.api.artifacts.maven.MavenDeployment deployment -> signing.signPom(deployment)
}
}
}
repository(url: sonatypeUrl) {
authentication(userName: System.getenv("sonatypeUsername"), password: System.getenv("sonatypePassword"))
}
pom.project {
name name
artifactId archivesBaseName
packaging packaging
inceptionYear inceptionYear
url url
description description
scm {
connection 'scm:git:git://github.com/AlmuraDev/AlmuraSDK.git'
developerConnection 'scm:git:ssh://git@github.com:AlmuraDev/AlmuraSDK.git'
url 'https://github.com/AlmuraDev/AlmuraSDK'
}
licenses {
license {
name 'The MIT License'
url 'http://www.tldrlegal.com/license/mit-license'
distribution 'repo'
}
}
developers {
developer {
id 'Zidane'
name 'Chris Sanders'
email 'zidane@outlook.com'
}
developer {
id 'Grinch'
name 'Steven Downer'
email 'grinch@outlook.com'
}
developer {
id 'Dockter'
name 'Mike Howe'
email 'dockter@almuramc.com'
}
}
organization {
name organization
url url
}
issueManagement {
system 'github'
url 'https://github.com/AlmuraDev/AlmuraSDK/issues'
}
}
}
}