This repository was archived by the owner on Apr 20, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
109 lines (92 loc) · 2.92 KB
/
build.gradle
File metadata and controls
109 lines (92 loc) · 2.92 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
107
108
109
plugins {
id 'java-library'
id 'org.comroid.codegen.spigot' version '+'
id 'xyz.jpenilla.run-paper' version '2.3.1'
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'de.undercouch.download' version '5.5.+' apply false
}
group = 'com.ampznetwork'
version = '1'
repositories {
maven {
name = 'comroid'
url = 'https://maven.comroid.org'
}
maven {
name = "spigotmc-repo"
url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
}
maven {
name = 'PAPI'
url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/'
}
mavenLocal()
mavenCentral()
}
dependencies {
compileOnly 'org.spigotmc:spigot-api:1.21.1-R0.1-SNAPSHOT'
api project(':japi')
api 'net.kyori:adventure-text-serializer-plain:4.+'
api 'net.kyori:adventure-text-serializer-legacy:4.+'
implementation 'net.kyori:adventure-text-serializer-json:4.+'
implementation 'net.kyori:adventure-text-serializer-gson:4.+'
implementation 'net.kyori:adventure-platform-bungeecord:4.+'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.18.0'
implementation 'com.rabbitmq:amqp-client:5.18.0'
compileOnly fileTree(dir: "$projectDir/libs/hytale", include: ['*.jar'])
compileOnly 'me.clip:placeholderapi:2.+'
generatedCompileOnly project(':japi')
generatedCompileOnly 'org.projectlombok:lombok:+'
generatedAnnotationProcessor 'org.projectlombok:lombok:+'
implementation(sourceSets.generated.output)
compileOnly 'org.projectlombok:lombok:+'
annotationProcessor 'org.projectlombok:lombok:+'
}
tasks {
runServer {
minecraftVersion("1.21")
}
generateSpigotResourceClasses {
pluginYml = file("$projectDir/src/main/resources/plugin.yml")
}
}
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.named('shadowJar', ShadowJar) {
relocate 'net.kyori', 'shadow.kyori'
}
*/
tasks.create('simpleTest', Copy) {
dependsOn tasks.shadowJar
from tasks.shadowJar.outputs.files.singleFile
into "$rootDir/run/spigot/plugins"
rename { 'ChatModLite.jar' }
}
tasks.create('hytaleTest', Copy) {
dependsOn tasks.shadowJar
from tasks.shadowJar.outputs.files.singleFile
into "$rootDir/run/hytale/mods"
rename { 'ChatModLite.jar' }
}