-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
80 lines (69 loc) · 2.45 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val kotlinxCoroutines: String by project
val kotlinxSerialization: String by project
val kmongo: String by project
val kmongoSerialization: String by project
val diskord: String by project
val slasher: String by project
val kotlingua: String by project
plugins {
kotlin("jvm") version "1.5.10"
kotlin("plugin.serialization") version "1.6.10"
`maven-publish`
}
group = "com.github.myraBot"
val id = "KMongo"
version = "0.17"
repositories {
mavenCentral()
maven(url = "https://m2.dv8tion.net/releases")
maven(url = "https://m5rian.jfrog.io/artifactory/java")
maven(url = "https://systems.myra.bot/releases") {
credentials {
username = System.getenv("REPO_NAME")
password = System.getenv("REPO_SECRET")
}
}
}
dependencies {
val kotlinxGroup = "org.jetbrains.kotlinx"
// Coroutines
compileOnly("$kotlinxGroup:kotlinx-coroutines-core:$kotlinxCoroutines")
compileOnly("$kotlinxGroup:kotlinx-coroutines-jdk8:$kotlinxCoroutines")
compileOnly("org.litote.kmongo", "kmongo-coroutine-serialization", kmongo) // KMongo
compileOnly(group = "com.github.myraBot", name = "Diskord", version = diskord) // Discord Wrapper
// Coroutines
testImplementation("$kotlinxGroup:kotlinx-coroutines-core:$kotlinxCoroutines")
testImplementation("$kotlinxGroup:kotlinx-coroutines-jdk8:$kotlinxCoroutines")
testImplementation("org.litote.kmongo", "kmongo-coroutine-serialization",kmongo) // KMongo
testImplementation(group = "com.github.myraBot", name = "Diskord", version = diskord) // Discord Wrapper
}
/* 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 = System.getenv("REPO_NAME")
password = System.getenv("REPO_SECRET")
}
authentication { create<BasicAuthentication>("basic") }
}
}
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "16"
}