This repository has been archived by the owner on Aug 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
108 lines (84 loc) · 2.56 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
buildscript {
repositories {
maven {
name = "KotDis"
url = uri("https://maven.kotlindiscord.com/repository/maven-public/")
}
}
}
plugins {
application
`maven-publish`
kotlin("jvm") version "1.4.10"
id("com.github.jakemarsden.git-hooks") version "0.0.1"
id("com.github.johnrengelman.shadow") version "5.2.0"
id("io.gitlab.arturbosch.detekt") version "1.13.1"
}
group = "com.kotlindiscord.bot"
version = "1.0-SNAPSHOT"
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "11"
kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven {
name = "KotDis"
url = uri("https://maven.kotlindiscord.com/repository/maven-public/")
}
}
dependencies {
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.13.1")
implementation("com.kotlindiscord.api:client:1.1-SNAPSHOT")
implementation("com.kotlindiscord.kord.extensions:kord-extensions:1.4.0-RC2")
implementation("com.uchuhimo:konf:0.23.0")
implementation("com.uchuhimo:konf-toml:0.23.0")
implementation("org.apache.commons:commons-text:1.8")
implementation("org.nibor.autolink:autolink:0.10.0")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2")
// Logging dependencies
implementation("ch.qos.logback:logback-classic:1.2.3")
implementation("io.github.microutils:kotlin-logging:2.0.3")
implementation("io.sentry:sentry-logback:3.2.0")
implementation("org.codehaus.groovy:groovy:3.0.4") // For logback config
}
application {
mainClassName = "com.kotlindiscord.bot.KDBotKt"
}
detekt {
buildUponDefaultConfig = true
config = files("detekt.yml")
}
gitHooks {
setHooks(
mapOf("pre-commit" to "detekt")
)
}
tasks.jar {
manifest {
attributes(
"Main-Class" to "com.kotlindiscord.bot.KDBotKt"
)
}
}
tasks.processResources {
dependsOn("generateBuildInfo")
from("src/main/resources/build.properties")
}
val generateBuildInfo = task("generateBuildInfo") {
outputs.file("src/main/resources/build.properties")
doLast {
File("src/main/resources/build.properties").writeText(
"version=${project.version}"
)
}
}