-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle.kts
109 lines (92 loc) · 3.21 KB
/
build.gradle.kts
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
import java.io.ByteArrayOutputStream
plugins {
id("java-library")
id("java")
id("maven-publish")
id("io.github.goooler.shadow") version "8.1.8"
id("io.papermc.paperweight.userdev") version "2.0.0-beta.16" apply false
id("xyz.jpenilla.run-paper") version "2.3.1"
}
val paperRepo = "https://repo.papermc.io/repository/maven-public/";
val sonatypeRepo = "https://oss.sonatype.org/content/groups/public/";
val engineHubRepo = "https://maven.enginehub.org/repo/";
val jitpack = "https://jitpack.io"
val mojang = "https://libraries.minecraft.net";
dependencies {
implementation(project(":database"))
implementation(project(":api"))
implementation(project(":plugin"))
implementation(project(":nms:v1_20_R1"))
implementation(project(":nms:v1_20_R2"))
implementation(project(":nms:v1_20_R3"))
implementation(project(":nms:v1_20_R4"))
implementation(project(":nms:v1_21_R1"))
implementation(project(":nms:v1_21_R2"))
implementation(project(":nms:v1_21_R3"))
implementation(project(":nms:v1_21_R4"))
}
allprojects {
group = "fr.euphyllia";
version = "2.0-" + (System.getenv("GITHUB_RUN_NUMBER") ?: getGitCommitHash())
description = "First Skyblock plugin on Folia. If you want features, join us on our Discord.";
apply(plugin = "java-library")
apply(plugin = "io.github.goooler.shadow")
apply(plugin = "maven-publish")
repositories {
mavenLocal()
mavenCentral()
maven(paperRepo)
maven(sonatypeRepo)
maven(engineHubRepo)
maven(mojang)
maven(jitpack)
}
dependencies {
compileOnly("org.apache.maven.resolver:maven-resolver-api:2.0.7")
compileOnly("org.apache.logging.log4j:log4j-api:2.24.3")
compileOnly("org.apache.logging.log4j:log4j-core:2.24.3")
compileOnly("org.mariadb.jdbc:mariadb-java-client:3.5.2")
compileOnly("com.zaxxer:HikariCP:6.2.1")
compileOnly("org.xerial:sqlite-jdbc:3.49.1.0")
compileOnly("net.kyori:adventure-text-minimessage:4.19.0")
compileOnly("com.electronwill.night-config:toml:3.8.1")
compileOnly("com.github.ben-manes.caffeine:caffeine:3.1.6")
compileOnly("net.md-5:bungeecord-api:1.20-R0.2")
compileOnly("com.mojang:brigadier:1.0.18")
compileOnly("org.mongodb:mongodb-driver-sync:5.4.0-alpha0")
compileOnly("org.mongodb:bson:5.4.0-alpha0")
}
tasks {
compileJava {
options.encoding = "UTF-8"
}
processResources {
filesMatching("**/paper-plugin.yml") {
expand(rootProject.project.properties)
}
// Always re-run this task
outputs.upToDateWhen { false }
}
}
}
tasks.test {
useJUnitPlatform()
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
fun getGitCommitHash(): String {
val stdout = ByteArrayOutputStream()
exec {
commandLine("git", "rev-parse", "--short", "HEAD") // "--short" retourne les premières lettres du commit
standardOutput = stdout
}
return stdout.toString().trim()
}
runPaper.folia.registerTask()
tasks {
runServer {
minecraftVersion("1.21.4")
}
}