-
Notifications
You must be signed in to change notification settings - Fork 115
/
build.gradle
112 lines (94 loc) · 2.21 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
buildscript {
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
maven {
name = 'sponge-repo'
url = 'https://repo.spongepowered.org/maven'
}
}
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 {
name = 'sponge-repo'
url = 'https://repo.spongepowered.org/maven/'
}
}
// Common dependencies
dependencies {
compile 'org.spongepowered:spongeapi:7.1.0'
}
// 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(
'https://docs.oracle.com/javase/8/docs/api/',
'https://jd.spongepowered.org/7.1.0/'
)
// 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
wrapper {
gradleVersion = '5.6.2'
}