-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.gradle
More file actions
64 lines (56 loc) · 1.63 KB
/
build.gradle
File metadata and controls
64 lines (56 loc) · 1.63 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
plugins {
id "java"
id "com.github.johnrengelman.shadow" version "7.1.2"
}
version project.properties["pluginVersion"]
targetCompatibility = sourceCompatibility = JavaVersion.VERSION_17
repositories {
mavenCentral()
//maven artifact repo urls
[
"https://jitpack.io",
"https://papermc.io/repo/repository/maven-public/",
"https://s01.oss.sonatype.org/content/groups/public/",
"https://oss.sonatype.org/content/groups/public/",
].each { s ->
maven {
url s
}
}
}
dependencies {
//compile
[
"io.papermc.paper:paper-api:1.19-R0.1-SNAPSHOT",
"org.jetbrains:annotations:20.1.0",
"io.github.simplexdevelopment:SimplexCL:1.1.0",
"org.apache.commons:commons-lang3:3.7",
"org.reflections:reflections:0.9.10"
].each {s ->
implementation s
}
}
shadowJar {
classifier project.properties["pluginJarClassifier"].toString()
baseName project.properties["pluginName"].toString()
//shading and relocation
[
"io.github.simplexdevelopment"
].each {s ->
relocate s, "${project.properties["pluginMainPackage"]}.shaded.$s"
}
}
processResources {
//update resources when building
doFirst {
file("$buildDir/resources/main").listFiles().each {
it.delete()
}
}
//define variables
expand(
"pluginVersion": project.version,
"pluginName": project.properties["pluginName"],
"pluginMain": "${project.properties["pluginMainPackage"]}.${project.properties["pluginMain"]}"
)
}