-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
92 lines (78 loc) · 2.75 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
@file:Suppress("SpellCheckingInspection")
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val kommons: String by project
val ktor: String by project
val kotlinx: String by project
val kotlinxSerialization: String by project
plugins {
kotlin("jvm") version "1.9.20"
kotlin("plugin.serialization") version "1.6.21"
`maven-publish`
}
val id = "Diskord"
group = "bot.myra"
version = "2.2.14"
repositories {
mavenCentral()
maven("https://systems.myra.bot/releases/") {
credentials {
username = property("REPO_NAME")?.toString()
password = property("REPO_SECRET")?.toString()
}
}
maven("https://m2.dv8tion.net/releases")
maven("https://jitpack.io")
}
dependencies {
implementation("io.ktor:ktor-client-core:$ktor")
implementation("io.ktor:ktor-client-okhttp:$ktor")
implementation("io.ktor:ktor-client-websockets:$ktor")
implementation("io.ktor:ktor-network:$ktor")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinxSerialization") // Serializer
// Reflections
implementation(kotlin("reflect"))
implementation("org.reflections:reflections:0.10.2")
// Voice encryption
implementation("com.codahale:xsalsa20poly1305:0.11.0")
implementation("club.minnced", "opus-java", "1.1.1") // Opus encoder / decoder
implementation("club.minnced", "opus-java-natives", "1.1.1")
compileOnly("net.java.dev.jna", "jna", "5.13.0") // Java native bindings
implementation("org.jetbrains.kotlinx", "kotlinx-datetime", "0.4.0")
testImplementation(kotlin("reflect"))
testImplementation("org.reflections:reflections:0.10.2")
testImplementation("com.github.Walkyst", "lavaplayer-fork", "0a721fbec4")
testImplementation("ch.qos.logback", "logback-classic", "1.2.3") // Logger
}
// Publishing
val sourcesJar by tasks.registering(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets["main"].allSource)
}
publishing {
repositories {
publications {
create<MavenPublication>("repo") {
group = project.group as String
version = project.version as String
artifactId = id
from(components["java"])
}
}
maven {
url = uri("https://systems.myra.bot/releases/")
name = "repo"
credentials {
username = property("REPO_NAME")?.toString()
password = property("REPO_SECRET")?.toString()
}
authentication { create<BasicAuthentication>("basic") }
}
}
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "17"
kotlinOptions.freeCompilerArgs += listOf(
"-Xopt-in=kotlin.RequiresOptIn",
"-Xopt-in=kotlin.OptIn"
)
}