-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
70 lines (62 loc) · 2.02 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
plugins {
id 'java'
id 'xyz.jpenilla.run-paper' version '2.3.1'
}
group = 'org.zerobzerot'
version = '3.0.0'
repositories {
mavenCentral()
maven {
url = 'https://repo.papermc.io/repository/maven-public/'
content {
includeGroup 'com.mojang'
includeGroup 'io.papermc.paper'
includeGroup 'net.kyori'
includeGroup 'net.md-5'
}
}
maven {
// ProtocolLib
url = 'https://repo.dmulloy2.net/nexus/repository/public/'
content {
includeGroup 'com.comphenix.protocol'
}
}
}
dependencies {
// https://jd.papermc.io/paper/1.21/
compileOnly group: 'io.papermc.paper', name: 'paper-api', version: "${project.minecraft_version}-R0.1-SNAPSHOT"
// https://github.com/dmulloy2/ProtocolLib
compileOnly group: 'com.comphenix.protocol', name: 'ProtocolLib', version: "${project.protocollib_version}-SNAPSHOT"
}
java {
toolchain.languageVersion = JavaLanguageVersion.of(21)
}
tasks.withType(JavaCompile).configureEach {
it.sourceCompatibility = it.targetCompatibility = JavaVersion.toVersion(21)
it.options.release = 21
it.options.encoding = 'UTF-8'
}
processResources {
filteringCharset "UTF-8"
filesMatching("plugin.yml") {
filter { line -> line.replace("@VERSION@", project.version) }
}
}
def artifactName(String type, String fileExt) {
return "${project.name}-${project.version}+${project.minecraft_version}-${type}.${fileExt}"
}
jar.archiveFileName.set(artifactName('paper', 'jar'))
jar.destinationDirectory.set(layout.buildDirectory.dir('dist'))
tasks {
runServer {
runDirectory = layout.projectDirectory.dir('run')
minecraftVersion(project.minecraft_version)
systemProperty('com.mojang.eula.agree', 'true')
systemProperty('Paper.skipServerPropertiesComments', 'true')
dependsOn('build')
downloadPlugins {
url("https://ci.dmulloy2.net/job/ProtocolLib/723/artifact/build/libs/ProtocolLib.jar")
}
}
}