-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
108 lines (88 loc) · 2.86 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
plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'maven-publish'
id 'java'
}
group = 'net.foulest'
version = '1.4.4'
description = 'KitPvP'
// Set the project's language level
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
repositories {
// Maven repositories
mavenCentral()
mavenLocal()
// Local libraries
flatDir {
dirs 'libs'
}
maven {
name 'Minebench'
url 'https://repo.minebench.de'
}
}
dependencies {
// Spigot 1.8.8 - necessary for project; provided in libs
// https://hub.spigotmc.org/nexus/content/repositories/snapshots
compileOnly group: 'org.spigotmc', name: 'spigot', version: '1.8.8-R0.1-SNAPSHOT'
// HikariCP - for database pooling
// https://mvnrepository.com/artifact/com.zaxxer/HikariCP
implementation group: 'com.zaxxer', name: 'HikariCP', version: '4.0.3'
// PlaceholderAPI - for placeholders
// https://mvnrepository.com/artifact/me.clip/placeholderapi
compileOnly group: 'me.clip', name: 'placeholderapi', version: '2.11.1'
// WorldEdit - required for WorldGuard
// https://mvnrepository.com/artifact/com.sk89q.worldedit/worldedit-bukkit
compileOnly group: 'com.sk89q.worldedit', name: 'worldedit-bukkit', version: '6.1.9'
// WorldGuard - for region data
// https://mvnrepository.com/artifact/com.sk89q.worldguard/worldguard-legacy
compileOnly group: 'com.sk89q.worldguard', name: 'worldguard', version: '6.1'
// JetBrains Annotations - for code inspection and documentation
// https://mvnrepository.com/artifact/org.jetbrains/annotations
compileOnly group: 'org.jetbrains', name: 'annotations', version: '26.0.1'
// Lombok - for reducing boilerplate code
// https://projectlombok.org
compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.18.34'
annotationProcessor group: 'org.projectlombok', name: 'lombok', version: '1.18.34'
}
tasks {
jar {
archiveFileName.set("${project.name}-${project.version}-default.jar")
}
shadowJar {
archiveFileName.set("${project.name}-${project.version}.jar")
enableRelocation = true
relocationPrefix = 'net.foulest.kitpvp.shaded'
}
compileJava {
dependsOn(clean)
options.encoding = 'UTF-8'
}
build {
dependsOn(shadowJar)
}
processResources {
filesMatching('**/*.yml') {
filter { final line ->
line.replace('${project.version}', project.version)
}
}
}
tasks.register('sourceJar', Jar) {
from sourceSets.main.allJava
}
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId = 'net.foulest.kitpvp'
artifactId = project.name
version = project.version
from components.java
}
}
}