-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
93 lines (80 loc) · 2.59 KB
/
build.gradle.kts
File metadata and controls
93 lines (80 loc) · 2.59 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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "2.2.20"
`maven-publish`
}
val minestomVersion = "2026.03.03-1.21.11"
val minecraftVersion = minestomVersion.substringAfter('-')
val libraryVersion = "0.1.1"
group = "codes.bed"
version = "${libraryVersion}-${minecraftVersion}-DEV"
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(25))
withSourcesJar()
withJavadocJar()
}
publishing {
publications {
create<MavenPublication>("gpr") {
from(components["java"])
}
}
repositories {
mavenLocal()
}
}
repositories {
mavenCentral()
maven("https://jitpack.io")
maven("https://mvn.utf.lol/releases") { name = "utfRepo" }
maven(url = "https://central.sonatype.com/repository/maven-snapshots/") {
content {
includeModule("net.minestom", "minestom")
includeModule("net.minestom", "testing")
}
}
maven("https://repo.codemc.io/repository/maven-public/")
}
dependencies {
// Kotlin
implementation(kotlin("stdlib"))
// Minestom Core
compileOnly("net.minestom:minestom:${minestomVersion}")
runtimeOnly("net.minestom:minestom:${minestomVersion}")
// Logging backend for local test server runs
runtimeOnly("org.slf4j:slf4j-simple:2.0.17")
}
tasks {
withType<JavaCompile>().configureEach {
options.release.set(25)
options.encoding = "UTF-8"
options.compilerArgs.addAll(
listOf(
"-parameters"
)
)
}
withType<KotlinCompile>().configureEach {
compilerOptions {
// Kotlin currently emits up to JVM 24 bytecode; Java sources still target Java 25.
jvmTarget.set(JvmTarget.fromTarget("24"))
freeCompilerArgs.addAll(
listOf(
"-Xcontext-receivers"
)
)
}
}
register<JavaExec>("runTestServer") {
group = "application"
description = "Runs the local Minestom test server entry point"
classpath = sourceSets.main.get().runtimeClasspath
mainClass.set("codes.bed.minestom.menus.testing.TestServerKt")
// Keep console logs compact and readable for local debugging.
systemProperty("org.slf4j.simpleLogger.showDateTime", "true")
systemProperty("org.slf4j.simpleLogger.dateTimeFormat", "HH:mm:ss")
systemProperty("org.slf4j.simpleLogger.showThreadName", "false")
systemProperty("org.slf4j.simpleLogger.defaultLogLevel", "info")
}
}