-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
106 lines (92 loc) · 2.75 KB
/
build.gradle
File metadata and controls
106 lines (92 loc) · 2.75 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
plugins {
id 'java'
id 'com.gradleup.shadow' version '9.0.0-beta4'
id("xyz.jpenilla.run-paper") version "2.3.1"
}
group = 'me.typical'
version = '1.0'
repositories {
mavenCentral()
maven {
name = "papermc-repo"
url = "https://repo.papermc.io/repository/maven-public/"
}
maven {
name = "codemc-repo"
url = "https://repo.codemc.org/repository/maven-public/"
}
maven {
name = "jitpack"
url = "https://jitpack.io"
}
maven {
name = "xenondevs"
url = "https://repo.xenondevs.xyz/releases"
}
maven {
name = "tcoded-releases"
url = "https://repo.tcoded.com/releases"
}
maven {
name = "placeholderapi"
url = "https://repo.extendedclip.com/content/repositories/placeholderapi/"
}
}
dependencies {
// Paper API
compileOnly("io.papermc.paper:paper-api:1.21.11-R0.1-SNAPSHOT")
// Lombok
compileOnly("org.projectlombok:lombok:1.18.36")
annotationProcessor("org.projectlombok:lombok:1.18.36")
implementation("io.github.projectunified:uni-item-all:2.5.0")
// Database dependencies (shaded)
compileOnly("org.xerial:sqlite-jdbc:3.51.2.0")
compileOnly("com.zaxxer:HikariCP:6.2.1")
compileOnly("org.mariadb.jdbc:mariadb-java-client:3.5.3")
// Command API (shaded)
implementation("dev.jorel:commandapi-paper-shade:11.1.0")
// Config & FoliaLib (shaded)
implementation("de.exlll:configlib-yaml:4.8.0")
implementation("com.tcoded:FoliaLib:0.5.1")
// External plugin APIs (compile-only)
compileOnly("net.milkbowl.vault:VaultAPI:1.7")
compileOnly("me.clip:placeholderapi:2.11.6")
}
tasks {
build {
dependsOn shadowJar
}
}
shadowJar {
archiveClassifier.set('')
manifest {
attributes('paperweight-mappings-namespace': 'mojang')
}
// Relocate all shaded dependencies
relocate 'de.exlll.configlib', 'me.typical.lib.configlib'
relocate 'com.tcoded.folialib', 'me.typical.lib.folialib'
relocate 'dev.jorel.commandapi', 'me.typical.lib.commandapi'
}
def targetJavaVersion = 21
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
options.release.set(targetJavaVersion)
}
}
processResources {
def props = [version: version]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('paper-plugin.yml') {
expand props
}
}