This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
/
build.gradle
171 lines (140 loc) · 3.63 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
// Apply Gradle plugins
plugins {
id 'org.spongepowered.plugin' version '0.5.1'
id 'checkstyle'
id 'net.minecrell.licenser' version '0.1.3'
id 'net.minecrell.gitpatcher' version '0.8'
id 'blue.lapis.methodremapper' version '0.2'
id 'com.github.johnrengelman.shadow' version '1.2.3'
}
defaultTasks 'clean', 'licenseFormat', 'build'
// Project information
version = '1.0.0-SNAPSHOT'
apply from: 'gradle/deploy.gradle'
allprojects {
group = 'blue.lapis'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
repositories {
mavenCentral()
}
}
// Project repositories
repositories {
jcenter()
maven {
name = 'lapis'
url = 'http://repo.lapis.blue/releases'
}
}
patches {
submodule = 'lib/Bukkit'
target = file('Porekit')
patches = file('patches')
}
subprojects {
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
}
project('Porekit') {
apply from: rootProject.file('bukkit.gradle')
compileJava.dependsOn rootProject.tasks.applyPatches
}
configurations {
shadow
compile {
extendsFrom shadow
}
shadowRuntime {
extendsFrom shadow
}
runtime {
extendsFrom shadowRuntime
}
}
// Project dependencies
dependencies {
compile project(':ap')
// To update, go to https://repo.spongepowered.org/maven/org/spongepowered/spongeapi/2.1-SNAPSHOT/
// Then pick latest version (or whatever version you want)
compile 'org.spongepowered:spongeapi:4.0.3'
runtime 'blue.lapis.methodremapper:tweaker:0.1'
shadow project('Porekit')
shadowRuntime 'mysql:mysql-connector-java:5.1.38'
testCompile 'junit:junit:4.12'
testCompile 'org.hamcrest:hamcrest-library:1.3'
testCompile 'org.mockito:mockito-core:1.10.19'
testRuntime 'org.slf4j:slf4j-simple:1.7.13'
}
allprojects {
// Read source files using UTF-8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
}
tasks.withType(JavaCompile) {
options.compilerArgs += [
'-Xlint:all',
'-Xlint:-deprecation'
]
}
test {
testLogging {
showStandardStreams = true
exceptionFormat = 'full'
events 'skipped'
}
}
compileTestJava {
options.compilerArgs += '-proc:none'
}
// Remap the older Bukkit methods
remap {
inputTask = shadowJar
}
jar {
manifest {
attributes(
'Specification-Title': 'Bukkit',
'Specification-Version': project('Porekit').version,
'Specification-Vendor': 'SpigotMC',
'Implementation-Title': project.name,
'Implementation-Version': project.version + versionSuffix,
'Implementation-Vendor': 'Lapis',
'Main-Class': 'blue.lapis.pore.util.InfoMain'
)
}
}
shadowJar {
classifier = ''
exclude 'remap.txt'
configurations = [project.configurations.shadowRuntime]
dependencies {
exclude dependency('com.google.guava:guava')
exclude dependency('com.google.code.gson:gson')
exclude dependency('org.yaml:snakeyaml')
}
}
configure([project, project(':ap')]) {
apply plugin: 'net.minecrell.licenser'
// License header formatting
license {
header rootProject.file('LICENSE')
include '**/*.java'
exclude '**/lib/**'
sourceSets = project.sourceSets
ignoreFailures false
}
}
checkstyle {
toolVersion = '6.14.1'
configProperties = [
'basedir': project.projectDir,
'severity': 'warning'
]
configFile = file('etc/checkstyle.xml')
}
task wrapper(type: Wrapper) {
gradleVersion = '2.11'
}