-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
126 lines (115 loc) · 4.11 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
121
122
123
124
125
126
import xyz.jpenilla.runtask.task.AbstractRun
plugins {
id 'java'
id("xyz.jpenilla.run-paper") version "2.3.0"
id("io.github.goooler.shadow") version "8.1.7"
}
group = 'io.github.minus1over12'
version = '1.0.2'
repositories {
mavenCentral()
maven {
name = "papermc-repo"
url = "https://repo.papermc.io/repository/maven-public/"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/groups/public/"
}
maven {
name = "Minecraft Libraries"
url = "https://libraries.minecraft.net"
}
maven {
name = "spigot-repo"
url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
}
maven {
name = "sonatype-oss-snapshots"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
maven {
name = "opencollab-snapshot"
url = "https://repo.opencollab.dev/main/"
}
maven {
name = 'lunarclient'
url = 'https://repo.lunarclient.dev'
}
}
dependencies {
compileOnly "io.papermc.paper:paper-api:1.20.6-R0.1-SNAPSHOT"
compileOnly 'org.jetbrains:annotations:24.1.0'
implementation "org.bstats:bstats-bukkit:3.0.2"
compileOnly 'org.geysermc.floodgate:api:2.2.2-SNAPSHOT'
compileOnly 'com.lunarclient:apollo-api:1.1.3'
}
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('plugin.yml') {
expand props
}
}
tasks {
runServer {
// Configure the Minecraft version for our task.
// This is the only required configuration besides applying the plugin.
// Your plugin's jar (or shadowJar if present) will be used automatically.
minecraftVersion("1.21")
downloadPlugins {
hangar("Geyser", "Geyser")
hangar("Floodgate", "Floodgate")
modrinth("FastAsyncWorldEdit", "2.10.0")
hangar("ViaBackwards", "5.0.1")
hangar("ViaVersion", "5.0.1")
github("PaperMC", "Debuggery", "v1.5.1", "debuggery-bukkit-1.5.1.jar")
modrinth("ctfbuddy", "1.0.1") // Might as well test my other stuff at the same time.
modrinth("lunar-client-apollo", "1.1.3")
}
}
shadowJar {
relocate 'org.bstats', 'io.github.minus1over12.quadwars.bstats'
}
}
tasks.jar {
manifest {
attributes["Implementation-Title"] = "QuadWars"
attributes["Implementation-Version"] = version
attributes["Implementation-Vendor"] = "War Pigeon"
attributes["paperweight-mappings-namespace"] = "mojang"
}
reproducibleFileOrder = true
}
tasks.withType(AbstractRun).configureEach {
javaLauncher = javaToolchains.launcherFor {
languageVersion = JavaLanguageVersion.of(targetJavaVersion)
vendor = JvmVendorSpec.JETBRAINS
}
jvmArgs("-Xms512M", "-Xmx6G", "-XX:+UseG1GC", "-XX:+ParallelRefProcEnabled",
"-XX:MaxGCPauseMillis=200",
"-XX:+UnlockExperimentalVMOptions", "-XX:+DisableExplicitGC", "-XX:+AlwaysPreTouch",
"-XX:G1NewSizePercent=30", "-XX:G1MaxNewSizePercent=40", "-XX:G1HeapRegionSize=8M",
"-XX:G1ReservePercent=20", "-XX:G1HeapWastePercent=5", "-XX:G1MixedGCCountTarget=4",
"-XX:InitiatingHeapOccupancyPercent=15", "-XX:G1MixedGCLiveThresholdPercent=90",
"-XX:G1RSetUpdatingPauseTimePercent=5", "-XX:SurvivorRatio=32",
"-XX:+PerfDisableSharedMem", "-XX:MaxTenuringThreshold=1",
"-Dusing.aikars.flags=https://mcflags.emc.gs", "-Daikars.new.flags=true",
"-XX:+AllowEnhancedClassRedefinition")
}