-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
55 lines (48 loc) · 1.5 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
plugins {
id 'java'
id 'xyz.jpenilla.run-paper' version '2.3.1'
}
group = 'org.zerobzerot'
version = '1.1.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'
}
}
}
dependencies {
// https://jd.papermc.io/paper/1.20.4
compileOnly group: 'io.papermc.paper', name: 'paper-api', version: "${project.minecraft_version}-R0.1-SNAPSHOT"
}
java {
toolchain.languageVersion = JavaLanguageVersion.of(17)
}
tasks.withType(JavaCompile).configureEach {
it.sourceCompatibility = it.targetCompatibility = JavaVersion.toVersion(17)
it.options.release = 17
it.options.encoding = 'UTF-8'
}
processResources {
filteringCharset "UTF-8"
filesMatching("plugin.yml") {
filter { line -> line.replace("@VERSION@", project.version) }
}
}
jar.archiveFileName.set("${project.name}-${project.version}+${project.minecraft_version}-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')
systemProperty('com.mojang.eula.agree', 'true')
}
}