-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
99 lines (75 loc) · 2.3 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
plugins {
kotlin("jvm") version "2.1.0"
kotlin("plugin.serialization") version "2.0.21"
id("org.jetbrains.dokka") version "1.9.20"
`maven-publish`
}
var host = "github.com/TheFruxz/Stacked"
version = "2025.1"
group = "dev.fruxz"
repositories {
mavenCentral()
maven("https://repo.fruxz.dev/releases")
}
dependencies {
testImplementation(kotlin("test"))
implementation("dev.fruxz:ascend:2024.2.2")
implementation("net.kyori:adventure-api:4.17.0")
implementation("net.kyori:adventure-text-serializer-legacy:4.17.0")
implementation("net.kyori:adventure-text-minimessage:4.17.0")
implementation("net.kyori:adventure-text-serializer-plain:4.17.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3")
}
val dokkaJavadocJar by tasks.register<Jar>("dokkaJavadocJar") {
dependsOn(tasks.dokkaJavadoc)
from(tasks.dokkaJavadoc.flatMap { it.outputDirectory })
archiveClassifier.set("javadoc")
}
val dokkaHtmlJar by tasks.register<Jar>("dokkaHtmlJar") {
dependsOn(tasks.dokkaHtml)
from(tasks.dokkaHtml.flatMap { it.outputDirectory })
archiveClassifier.set("html-doc")
}
val sourceJar by tasks.register<Jar>("sourceJar") {
from(sourceSets.main.get().allSource)
archiveClassifier.set("sources")
}
publishing {
repositories {
mavenLocal()
maven("https://repo.fruxz.dev/releases") {
name = "fruxz.dev"
credentials {
username = project.findProperty("fruxz.dev.user") as? String? ?: System.getenv("FRUXZ_DEV_USER")
password = project.findProperty("fruxz.dev.secret") as? String? ?: System.getenv("FRUXZ_DEV_SECRET")
}
}
}
publications.create("Stacked", MavenPublication::class) {
artifactId = name.lowercase()
version = version.lowercase()
artifact(dokkaJavadocJar)
artifact(dokkaHtmlJar)
artifact(sourceJar) {
classifier = "sources"
}
from(components["kotlin"])
}
}
tasks {
kotlin {
compilerOptions {
freeCompilerArgs.add("-Xcontext-receivers")
}
}
dokkaHtml.configure {
outputDirectory.set(layout.projectDirectory.dir("docs"))
}
}
kotlin {
jvmToolchain(21)
}
java {
withJavadocJar()
withSourcesJar()
}