-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
117 lines (97 loc) · 2.58 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
plugins {
id 'java'
id 'maven'
id 'idea'
id 'eclipse'
id 'net.minecrell.licenser' version '0.3'
id 'com.github.johnrengelman.shadow' version '1.2.4'
}
defaultTasks 'clean', 'licenseFormat', 'build'
sourceCompatibility = 1.8
targetCompatibility = 1.8
group = 'com.voxelgenesis'
archivesBaseName = project.name.toLowerCase()
version = '0.1.0-SNAPSHOT'
repositories {
mavenLocal()
mavenCentral()
maven {
url "https://repo.voxelgenesis.com/artifactory/decompiler/"
}
maven {
name = 'minecraft'
url = 'https://libraries.minecraft.net/'
}
}
// Common dependencies
dependencies {
compile 'org.ow2.asm:asm-all:5.0.3'
compile 'com.google.guava:guava:18.0'
compile 'com.google.code.findbugs:jsr305:1.3.9'
compile 'ninja.leaping.configurate:configurate-hocon:3.2'
compile 'org.spongepowered:despector:0.1.0-SNAPSHOT'
compile('net.minecraft:launchwrapper:1.12') {
exclude module: 'lwjgl'
}
testCompile 'junit:junit:4.11'
testCompile 'org.mockito:mockito-core:1.9.5'
}
// License header formatting
license {
header file('LICENSE')
include '**/*.java'
newLine = false
}
// Source compiler configuration
configure([compileJava, compileTestJava]) {
options.compilerArgs += ['-Xlint:all', '-Xlint:-path']
options.deprecation = true
options.encoding = 'UTF-8'
}
processResources {
// Include LICENSE in final JAR
from 'LICENSE'
}
// Set manifest entries
jar {
classifier 'base'
manifest {
attributes(
'Built-By': System.properties['user.name'],
'Created-By': "${System.properties['java.vm.version']} (${System.properties['java.vm.vendor']})"
)
}
}
shadowJar {
classifier ''
dependencies {
include(dependency('ninja.leaping.configurate:configurate-core'))
include(dependency('ninja.leaping.configurate:configurate-hocon'))
include(dependency('org.spongepowered:despector'))
}
}
task sourceJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
javadoc {
options.encoding = 'UTF-8'
options.charSet = 'UTF-8'
options.links(
'https://docs.oracle.com/javase/8/docs/api/'
)
// Disable the crazy super-strict doclint tool in Java 8
options.addStringOption('Xdoclint:none', '-quiet')
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives shadowJar
archives sourceJar
archives javadocJar
}
task wrapper(type: Wrapper) {
gradleVersion = '3.1'
}