-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
build.gradle.kts
121 lines (96 loc) · 2.46 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
application
alias(libs.plugins.kotlin)
alias(libs.plugins.kotlinx.serialization)
alias(libs.plugins.shadow)
alias(libs.plugins.detekt)
alias(libs.plugins.git.hooks)
alias(libs.plugins.grgit)
alias(libs.plugins.blossom)
}
group = "org.hyacinthbots.lilybot"
version = "4.8.0"
repositories {
mavenCentral()
maven {
name = "Sonatype Snapshots (Legacy)"
url = uri("https://oss.sonatype.org/content/repositories/snapshots")
}
maven {
name = "Sonatype Snapshots"
url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
}
maven {
name = "Fabric"
url = uri("https://maven.fabricmc.net/")
}
maven {
name = "QuiltMC (Snapshots)"
url = uri("https://maven.quiltmc.org/repository/snapshot/")
}
maven {
name = "JitPack"
url = uri("https://jitpack.io")
}
}
dependencies {
detektPlugins(libs.detekt)
implementation(libs.kord.extensions.core)
implementation(libs.kord.extensions.phishing)
implementation(libs.kord.extensions.pluralkit)
implementation(libs.kord.extensions.unsafe)
implementation(libs.kotlin.stdlib)
// Logging dependencies
implementation(libs.logback)
implementation(libs.logging)
// Github API
implementation(libs.github.api)
// KMongo
implementation(libs.kmongo)
// Cozy's welcome module
implementation(libs.cozy.welcome)
implementation(libs.dma)
implementation(libs.docgenerator)
}
application {
mainClass.set("org.hyacinthbots.lilybot.LilyBotKt")
}
gitHooks {
setHooks(
mapOf("pre-commit" to "detekt")
)
}
tasks {
withType<KotlinCompile> {
compilerOptions {
jvmTarget.set(JvmTarget.fromTarget("17"))
languageVersion.set(KotlinVersion.fromVersion(libs.plugins.kotlin.get().version.requiredVersion.substringBeforeLast(".")))
incremental = true
freeCompilerArgs.add("-opt-in=kotlin.RequiresOptIn")
}
}
jar {
manifest {
attributes(
"Main-Class" to "org.hyacinthbots.lilybot.LilyBotKt"
)
}
}
wrapper {
// To update the gradle wrapper version run `./gradlew wrapper --gradle-version=<NEW_VERSION>`
distributionType = Wrapper.DistributionType.BIN
}
}
detekt {
buildUponDefaultConfig = true
config = files("$rootDir/detekt.yml")
autoCorrect = true
}
blossom {
replaceToken("@build_id@", grgit.head().abbreviatedId)
replaceToken("@version@", project.version.toString())
}