-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
69 lines (59 loc) · 1.64 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
plugins {
id("maven-publish")
alias(libs.plugins.kotlin.jvm)
}
fun kt(dep: String): String {
return "org.jetbrains.kotlin.$dep"
}
allprojects {
apply {
plugin("maven-publish")
plugin(kt("jvm"))
}
group = "ink.pmc.advkt"
version = "1.0.1"
repositories {
mavenCentral()
mavenLocal()
maven(uri("https://maven.nostal.ink/repository/maven-public"))
}
dependencies {
api(rootProject.libs.kotlin.stdlib)
api(rootProject.libs.adventure.api)
api(rootProject.libs.adventure.text.minimessage)
api(rootProject.libs.adventure.text.serializer.gson)
api(rootProject.libs.adventure.text.serializer.legacy)
api(rootProject.libs.adventure.text.serializer.plain)
api(rootProject.libs.adventure.text.serializer.ansi)
}
kotlin {
jvmToolchain(8)
}
tasks.compileJava {
targetCompatibility = "1.8"
options.encoding = "UTF-8"
}
}
subprojects {
publishing {
if (project.name == "test"){
return@publishing
}
repositories {
maven {
name = "nostal"
url = uri(
if (version.toString().endsWith("SNAPSHOT")) {
"https://maven.nostal.ink/repository/maven-snapshots/"
} else {
"https://maven.nostal.ink/repository/maven-releases/"
}
)
credentials(PasswordCredentials::class)
}
}
publications.create<MavenPublication>("maven") {
artifact(tasks.jar)
}
}
}