forked from Elytrium/VelocityTools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
85 lines (66 loc) · 1.95 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
//file:noinspection GroovyAssignabilityCheck
import com.github.spotbugs.snom.SpotBugsTask
plugins {
id "java"
id "checkstyle"
id "com.github.spotbugs" version "4.7.9"
id "org.cadixdev.licenser" version "0.6.1"
id "com.github.johnrengelman.shadow" version "7.0.0"
}
group = "net.elytrium"
version = "1.1.3"
compileJava.options.encoding = "UTF-8"
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
repositories {
mavenCentral()
maven {
name = "velocitypowered-repo"
url = "https://nexus.velocitypowered.com/repository/maven-public/"
}
}
dependencies {
compileOnly files("libs/3.0.0.jar")
annotationProcessor "com.velocitypowered:velocity-api:3+"
implementation "org.bstats:bstats-velocity:2.2.1"
compileOnly "com.github.spotbugs:spotbugs-annotations:4.4.2"
}
shadowJar {
relocate "org.bstats", "net.elytrium.velocitytools.bstats"
minimize()
setClassifier("")
}
license {
header = project.rootProject.file("HEADER.txt")
}
checkstyle {
toolVersion "9.0.1"
configFile file("${project.rootDir}/config/checkstyle/checkstyle.xml")
configProperties = [configDirectory: "${project.rootDir}/config/checkstyle"]
// The build should immediately fail if we have errors.
maxErrors = 0
maxWarnings = 0
}
tasks.withType(SpotBugsTask) {
reports {
html {
enabled = true
destination = file("$buildDir/reports/spotbugs/main/spotbugs.html")
stylesheet = "fancy-hist.xsl"
}
}
}
sourceSets.main.java.srcDir(tasks.register("generateTemplates", Copy) { task ->
task.inputs.properties "version": project.version
task.from file("src/main/templates")
task.into layout.buildDirectory.dir("generated/sources/templates")
task.expand "version": project.version
}.map {
it.outputs
})
build.dependsOn shadowJar