-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
138 lines (114 loc) · 4.37 KB
/
build.gradle
File metadata and controls
138 lines (114 loc) · 4.37 KB
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'kr.entree.spigradle' version '2.4.3'
id 'io.freefair.lombok' version '6.6.1'
id 'java'
id 'jacoco'
id 'idea'
}
apply from: "$rootDir/gradle/jacoco.gradle"
apply from: "$rootDir/gradle/publish.gradle"
if (project.hasProperty("local_script")) {
apply from: file(local_script + "/build.local.gradle")
}
sourceCompatibility = 17
targetCompatibility = 17
ext {
mcVersion = project.property("mcVersion")
}
group project.property("group")
spigot {
name = project.property("pluginName")
authors = [project.property("author")]
apiVersion = project.property("apiVersion")
load = POSTWORLD
depends = ['Essentials', 'MatrixCombatLevel', 'SkinsRestorer', 'Magic', 'EliteMobs', 'Slimefun', 'ProjectKorra','mcMMO', 'AuthMe']
excludeLibraries = ['*']
}
compileJava {
options.encoding = 'UTF-8'
options.compilerArgs += ["-parameters"]
options.fork = true
options.forkOptions.executable = 'javac'
}
archivesBaseName = project.property("pluginName")
repositories {
mavenLocal()
mavenCentral()
spigot()
bungeecord()
paper()
essentialsX()
bStats()
enginehub()
protocolLib()
maven { url = 'https://repo.aikar.co/content/groups/aikar/' }
jitpack()
}
dependencies {
// using using paper-api
implementation paper(mcVersion)
// Add your dependencies here
// Here are some opinionated dependencies that might help you with your plugin development:
// Annotation Command Framework: https://github.com/aikar/commands
// Use shadow to shade the library into your plugin
shadow "co.aikar:acf-paper:0.5.1-SNAPSHOT"
// Vault (https://github.com/MilkBowl/VaultAPI) for economy, permissions and chat API
// this dependency needs to be present at runtime, meaning Vault.jar needs to be in your plugins folder
compileOnly("com.github.MilkBowl:VaultAPI:1.7") {
exclude group: 'org.bukkit', module: 'bukkit'
}
implementation("org.glassfish.jersey.containers:jersey-container-jdk-http:2.27")
implementation("org.glassfish.jersey.media:jersey-media-json-jackson:2.27")
implementation("org.glassfish.jersey.inject:jersey-hk2:2.28")
implementation("com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.7.5")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.2")
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.20.0'
testImplementation group: 'org.slf4j', name: 'slf4j-jdk14', version: '2.0.0-alpha0'
implementation("org.hibernate:hibernate-core:5.3.23.Final")
implementation("mysql:mysql-connector-java:8.0.27")
implementation("com.google.inject:guice:4.0")
implementation("com.fasterxml.jackson.core:jackson-databind:2.10.0")
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5',
// Uncomment the next line if you want to use RSASSA-PSS (PS256, PS384, PS512) algorithms:
//'org.bouncycastle:bcprov-jdk15on:1.70',
'io.jsonwebtoken:jjwt-jackson:0.11.5' // or 'io.jsonwebtoken:jjwt-gson:0.11.5' for gsos
compileOnly("fr.xephi:authme:5.6.0-SNAPSHOT")
compileOnly("com.github.ProjectKorra:ProjectKorra:1.11.1")
compileOnly(files("libs/MatrixCombatLevel.jar"))
compileOnly(files("libs/SkinsRestorer.jar"))
compileOnly(files("libs/EssentialsX.jar"))
// Test dependencies
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.2'
testImplementation 'org.mockito:mockito-core:4.11.0'
testImplementation 'com.github.seeseemelk:MockBukkit-v1.19:2.147.1'
testImplementation 'org.assertj:assertj-core:3.24.1'
testImplementation("com.github.MilkBowl:VaultAPI:1.7")
}
shadowJar {
classifier = ''
configurations = [project.configurations.runtimeClasspath, project.configurations.shadow]
relocate 'co.aikar.commands', "${packageName}.acf"
relocate 'co.aikar.locales', "${packageName}.locales"
}
tasks.build.dependsOn(shadowJar)
tasks.publish.dependsOn(shadowJar)
tasks.prepareSpigotPlugins.dependsOn(shadowJar)
test {
useJUnitPlatform()
testLogging {
events "skipped", "failed"
}
ignoreFailures = false
}
processResources {
project.properties.put("version", this.version)
expand project.properties
}
defaultTasks 'build'