-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle.kts
94 lines (79 loc) · 2.73 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
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 "1.7.7" apply false
}
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 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"))
}
allprojects {
group = "fr.euphyllia";
version = "1.0-" + (System.getenv("GITHUB_RUN_NUMBER") ?: getGitCommitHash())
description = "First Skyblock Plugin for Folia";
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)
}
dependencies {
compileOnly("org.apache.maven.resolver:maven-resolver-api:2.0.4")
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.1")
compileOnly("com.zaxxer:HikariCP:6.2.1")
compileOnly("net.kyori:adventure-text-minimessage:4.17.0")
compileOnly("com.electronwill.night-config:toml:3.8.1")
compileOnly("com.google.guava:guava:33.3.1-jre")
compileOnly("net.md-5:bungeecord-api:1.20-R0.2")
implementation("com.mojang:brigadier:1.0.18")
}
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()
}