-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
86 lines (73 loc) · 2.59 KB
/
build.gradle.kts
File metadata and controls
86 lines (73 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
plugins {
kotlin("jvm") version "2.3.10"
// Add the Vanniktech plugin which supports the new Central Portal API
id("com.vanniktech.maven.publish") version "0.30.0"
}
group = "codes.bed.minestom"
version = "0.1.3"
description = "A small Minestom NPC library providing per-player dialogue holograms and configurable name displays"
repositories {
mavenCentral()
}
dependencies {
testImplementation(kotlin("test"))
api("net.minestom:minestom:2026.03.03-1.21.11")
testImplementation("org.tinylog:tinylog-api-kotlin:2.8.0-M1")
testImplementation("org.tinylog:tinylog-impl:2.8.0-M1")
testImplementation("org.tinylog:slf4j-tinylog:2.8.0-M1")
testImplementation("io.github.revxrsal:lamp.common:4.0.0-rc.16")
testImplementation("io.github.revxrsal:lamp.minestom:4.0.0-rc.16")
}
kotlin {
jvmToolchain(25)
}
// The new unified publishing block
mavenPublishing {
coordinates(project.group.toString(), "npc", project.version.toString())
pom {
name.set("npc")
description.set(project.description)
inceptionYear.set("2024")
url.set("https://github.com/bed-dev/stomnpcs")
licenses {
license {
name.set("Apache-2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("bed-dev")
name.set("bed-dev")
url.set("https://github.com/bed-dev")
}
}
scm {
connection.set("scm:git:git://github.com/bed-dev/stomnpcs.git")
developerConnection.set("scm:git:ssh://github.com/bed-dev/stomnpcs.git")
url.set("https://github.com/bed-dev/stomnpcs")
}
}
// 1. Point to the new Central Portal API
// 2. automaticRelease = true tells Sonatype to publish immediately if validation passes
publishToMavenCentral(com.vanniktech.maven.publish.SonatypeHost.CENTRAL_PORTAL, automaticRelease = true)
// Enable GPG signing using the keys we will provide via GitHub Actions
signAllPublications()
}
tasks.test {
useJUnitPlatform()
failOnNoDiscoveredTests.set(false)
}
tasks.named<org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile>("compileTestKotlin") {
compilerOptions {
javaParameters.set(true)
}
}
tasks.register<JavaExec>("runTestServer") {
group = "application"
description = "Runs test server"
dependsOn(tasks.named("testClasses"))
classpath = sourceSets["test"].runtimeClasspath
mainClass.set("codes.bed.minestom.npc.test.TestServerKt")
standardInput = System.`in`
}