-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
93 lines (79 loc) · 2.44 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
plugins {
id 'java'
id("xyz.jpenilla.run-paper") version "2.3.0"
id("io.papermc.paperweight.userdev") version "1.7.5"
id 'com.github.johnrengelman.shadow' version '8.1.1'
id("com.gradleup.shadow") version "8.3.2"
id 'maven-publish'
}
group = "com.iantapply"
version = "1.2.0"
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/"
}
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/IanTapply22/Wynncraft")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
}
}
}
publications {
gpr(MavenPublication) {
from(components.java)
}
}
}
dependencies {
compileOnly "io.papermc.paper:paper-api:1.21.3-R0.1-SNAPSHOT"
implementation "net.kyori:adventure-api:4.17.0"
compileOnly 'org.projectlombok:lombok:1.18.32'
annotationProcessor 'org.projectlombok:lombok:1.18.32'
testCompileOnly 'org.projectlombok:lombok:1.18.32'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.32'
paperweight.paperDevBundle("1.21.3-R0.1-SNAPSHOT")
implementation 'xyz.jpenilla:reflection-remapper:0.1.1'
implementation 'org.postgresql:postgresql:42.7.4'
implementation 'org.incendo:cloud-paper:2.0.0-beta.10'
}
tasks {
runServer {
minecraftVersion("1.21.3")
}
shadowJar {
// Helper method to relocate a package into our package namespace
def reloc = { pkg ->
relocate(pkg, "com.iantapply.wynncraft.dependency.${pkg}")
}
// Relocate cloud and its transitive dependencies
reloc("org.incendo.cloud")
reloc("io.leangen.geantyref")
}
}
tasks.named('shadowJar') {
archiveClassifier.set('')
}
tasks.named('build') {
dependsOn(tasks.named('shadowJar'))
}
def targetJavaVersion = 21
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
}