-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
120 lines (103 loc) · 3.25 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
109
110
111
112
113
114
115
116
117
118
119
120
plugins {
id "java"
id "io.freefair.lombok" version "8.10"
id "com.gradleup.shadow" version "8.3.1"
id "xyz.jpenilla.run-paper" version "2.3.1"
}
group = "com.github.ipecter"
version = project.plugin_version
ConfigurableFileTree libs = fileTree(dir: "libs", include: ["*.jar"])
runServer {
minecraftVersion(bukkit_version)
}
repositories {
mavenCentral()
maven {
name = "spigotmc-repo"
url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/groups/public/"
}
maven {
url = "https://repo.extendedclip.com/content/repositories/placeholderapi/"
}
maven {
url = "https://mvnrepository.com/artifact/org.projectlombok/lombok"
}
maven {
url = "https://repo.oraxen.com/releases"
}
maven {
url = "https://jitpack.io"
}
maven {
url = "https://repo.dmulloy2.net/repository/public/"
}
maven {
url = "https://papermc.io/repo/repository/maven-public/"
}
maven {
url = "https://repo.skriptlang.org/releases"
}
}
dependencies {
// 플러그인 API
if (paper_plugin) compileOnly "io.papermc.paper:paper-api:${api_version}-R0.1-SNAPSHOT"
else compileOnly "org.spigotmc:spigot-api:${api_version}-R0.1-SNAPSHOT"
// 내부 종속성
compileOnly "net.kyori:adventure-platform-bukkit:4.3.2"
compileOnly "net.kyori:adventure-text-minimessage:4.14.0"
compileOnly "com.google.code.gson:gson:2.10.1"
compileOnly "com.google.guava:guava:33.0.0-jre"
compileOnly "org.apache.commons:commons-lang3:3.14.0"
compileOnly "com.github.Carleslc.Simple-YAML:Simple-Yaml:1.8.4"
// 외부 플러그인
compileOnly "me.clip:placeholderapi:2.11.6"
compileOnly "com.github.MilkBowl:VaultAPI:1.7.1"
compileOnly "com.comphenix.protocol:ProtocolLib:5.1.0"
compileOnly "net.luckperms:api:5.4"
compileOnly "io.th0rgal:oraxen:1.168.0"
compileOnly "com.github.LoneDev6:API-ItemsAdder:3.6.2-beta-r3-b"
compileOnly 'com.github.SkriptLang:Skript:2.8.5'
// Gradle 플러그인
compileOnly "org.projectlombok:lombok:1.18.32"
annotationProcessor "org.projectlombok:lombok:1.18.32"
// Jar 종속성
compileOnly libs
}
jar {
finalizedBy shadowJar
}
shadowJar {
setArchiveClassifier("")
doLast {
copy {
from archiveFile.get().asFile into file("$projectDir/builds")
}
}
}
def targetJavaVersion = java_version as Integer
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
}
tasks.withType(JavaCompile).configureEach {
options.release = targetJavaVersion
}
processResources {
def split = api_version.split("\\.");
def plugin_api_version = split[0] + "." + split[1];
def props =
[version: version, name: project.name, main: plugin_main, api_version: plugin_api_version, author: plugin_author]
inputs.properties props
filteringCharset "UTF-8"
filesMatching("plugin.yml") {
expand props
}
}