This repository has been archived by the owner on Sep 12, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathbuild.gradle
100 lines (84 loc) · 2.75 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
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '7.1.2'
}
group = 'rip.diamond'
version = "1.1.28-BETA-" + getGitHash()
processResources {
def props = [version: version]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('plugin.yml') {
expand props
}
}
compileJava.options.encoding = 'UTF-8'
compileJava {
sourceCompatibility = 8
targetCompatibility = 8
}
String getGitHash() {
def output = new ByteArrayOutputStream()
exec {
standardOutput = output // Only the std, not errors as it's not to worry about as long as it's a repo
commandLine 'git', 'rev-parse', '--short', 'HEAD'
}
return output.toString().trim()
}
repositories {
mavenLocal()
mavenCentral()
flatDir {
dir("./libs")
}
//Spigot and ImanitySpigot API
maven {
name "imanityLibraries"
url "https://maven.imanity.dev/imanity-libraries"
}
//PlaceholderAPI
maven {
url "https://repo.extendedclip.com/content/repositories/placeholderapi/"
}
//ProtocolLib
maven {
url "https://repo.dmulloy2.net/repository/public/"
}
//Citizens
maven {
name 'citizens-repo'
url 'https://maven.citizensnpcs.co/repo'
}
}
dependencies {
implementation 'org.mongodb:mongodb-driver-sync:4.9.0' //MongoDB driver (This has to be included in the plugin jar file, so we use implementation)
implementation 'rip.diamond:spigotapi:1.0-SNAPSHOT'
implementation 'com.github.ben-manes.caffeine:caffeine:2.9.3' //https://github.com/ben-manes/caffeine - A high performance caching library
testImplementation 'dev.imanity.mockbukkit:MockBukkit1.8:1.0.31'
testImplementation 'junit:junit:4.13.1'
//Libraries from local
compileOnly name: 'ImanitySpigot-API-2022.08.1b2'
compileOnly name: 'TacoSpigot-1.8.8'
compileOnly name: 'FastAsyncWorldEdit-bukkit-18.12.19-d131fa6-1241-22.0.3'
compileOnly name: 'worldedit-bukkit-6.1.9'
compileOnly name: 'ViaVersion-4.4.2'
//Libraries from others
compileOnly 'me.clip:placeholderapi:2.11.2' //PlaceholderAPI
compileOnly 'com.comphenix.protocol:ProtocolLib:4.7.0' //ProtocolLib
compileOnly 'net.citizensnpcs:citizensapi:2.0.30-SNAPSHOT' //Citizens
// Lombok
compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.24'
testCompileOnly 'org.projectlombok:lombok:1.18.24'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.24'
}
test {
useJUnit()
maxHeapSize = '1G'
}
configurations {
testCompile.extendsFrom compileOnly
}
tasks.withType(JavaCompile).configureEach {
options.forkOptions.jvmArgs.addAll(['--add-opens', 'jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED'])
}