-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
77 lines (67 loc) · 2.53 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val kommonsVersion: String by project
val diskordVersion: String by project
val kotlinxVersion: String by project
plugins {
kotlin("jvm") version "1.5.30"
`maven-publish`
}
group = "com.github.myraBot"
val id = "Slasher"
version = "1.12"
repositories {
mavenCentral()
maven(url = "https://systems.myra.bot/releases/") {
credentials {
username = System.getenv("REPO_NAME")
password = System.getenv("REPO_SECRET")
}
}
}
dependencies {
val kotlinxGroup = "org.jetbrains.kotlinx"
compileOnly("bot.myra:kommons:$kommonsVersion")
compileOnly(group = "com.github.myraBot", name = "Diskord", version = diskordVersion) // Discord Wrapper
compileOnly(kotlin("reflect"))
compileOnly(group = "org.reflections", name = "reflections", version = "0.10")
// Coroutines
compileOnly(group = kotlinxGroup, name = "kotlinx-coroutines-core", version = kotlinxVersion)
compileOnly(group = kotlinxGroup, name = "kotlinx-coroutines-jdk8", version = kotlinxVersion)
// JSON serialization
compileOnly(group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version = "1.3.0") // Serializer
testImplementation("bot.myra:kommons:$kommonsVersion")
testImplementation(group = "com.github.myraBot", name = "Diskord", version = diskordVersion) // Discord Wrapper
testImplementation(kotlin("reflect"))
testImplementation(group = "org.reflections", name = "reflections", version = "0.10")
testImplementation(group = kotlinxGroup, name = "kotlinx-coroutines-core")
testImplementation(group = kotlinxGroup, name = "kotlinx-coroutines-jdk8", version = kotlinxVersion)
}
/* 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"
}