forked from Katrix/VoxelSniper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
111 lines (92 loc) · 2.26 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
buildscript {
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.12.1"
}
}
apply plugin: 'java'
apply plugin: 'maven'
// Plugins for IDE project generation
apply plugin: 'eclipse'
apply plugin: 'idea'
defaultTasks 'build'
group = 'com.thevoxelbox'
archivesBaseName = 'VoxelSniper'
version = '8.5.0-SNAPSHOT'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
maven {
url "http://repo.spongepowered.org/maven/"
}
}
// Common dependencies
dependencies {
compile 'com.google.guava:guava:21.0'
compile 'org.spongepowered:spongeapi:7.0.0'
testCompile 'junit:junit:4.11'
testCompile 'org.mockito:mockito-core:1.9.5'
}
// Source compiler configuration
configure([compileJava, compileTestJava]) {
options.compilerArgs += ['-Xlint:all', '-Xlint:-path']
options.deprecation = true
options.encoding = 'UTF-8'
}
// Set manifest entries
jar {
manifest {
attributes(
'Built-By': System.properties['user.name'],
'Created-By': "${System.properties['java.vm.version']} (${System.properties['java.vm.vendor']})"
)
}
}
javadoc {
options.encoding = 'UTF-8'
options.charSet = 'UTF-8'
options.links(
'http://docs.guava-libraries.googlecode.com/git-history/v18.0/javadoc/',
'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
}
task sourceJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourceJar
archives javadocJar
}
processResources {
// Include LICENSE in final JAR
from 'LICENSE'
}
apply plugin: "com.github.hierynomus.license"
// License header formatting
license {
header = file('LICENSE')
include '**/*.java'
ignoreFailures = false
strictCheck = true
mapping {
java = 'SLASHSTAR_STYLE'
}
}
// Gradle version used for generating the Gradle wrapper
task wrapper(type: Wrapper) {
gradleVersion = '2.10'
}