-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
121 lines (97 loc) · 3.35 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.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.8.20"
application
kotlin("plugin.serialization") version "1.8.20"
}
group = "moe.kurenai.bot"
version = "0.0.1-SNAPSHOT"
repositories {
maven("https://maven.aliyun.com/repository/central/")
maven { url = uri("https://jitpack.io") }
mavenCentral()
mavenLocal {
content {
includeGroupByRegex(".*\\.kurenai.*")
includeGroup("net.mamoe")
}
}
}
dependencies {
implementation("org.jetbrains.kotlin", "kotlin-reflect")
implementation("org.jetbrains.kotlin", "kotlin-stdlib-jdk8")
val miraiVersion = "2.15.0-RC"
//mirai
implementation("net.mamoe", "mirai-core", miraiVersion)
implementation("net.mamoe", "mirai-core-api", miraiVersion)
implementation("net.mamoe", "mirai-core-utils", miraiVersion)
//telegram
implementation("moe.kurenai.tdlight", "td-light-sdk", "0.1.0-SNAPSHOT")
val ktor = "2.1.3"
implementation("io.ktor:ktor-client-core:${ktor}")
implementation("io.ktor:ktor-client-okhttp:${ktor}")
val log4j = "2.20.0"
//logging
implementation("org.apache.logging.log4j:log4j-core:$log4j")
implementation("org.apache.logging.log4j:log4j-api:$log4j")
implementation("org.apache.logging.log4j:log4j-slf4j2-impl:$log4j")
implementation("com.lmax:disruptor:3.4.4")
//xml
implementation("io.github.pdvrieze.xmlutil:core-jvm:0.84.3")
implementation("io.github.pdvrieze.xmlutil:serialization-jvm:0.84.3")
//json
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1")
//cache
implementation("com.sksamuel.aedile:aedile-core:1.2.0")
//tool kit
implementation("com.google.guava:guava:31.1-jre")
implementation("org.apache.commons", "commons-lang3")
implementation("org.apache.commons:commons-io:1.3.2")
implementation("com.esotericsoftware", "kryo", "5.1.1")
implementation("org.jsoup:jsoup:1.15.3")
implementation("io.github.kurenairyu", "simple-cache", "1.2.0-SNAPSHOT")
implementation("org.redisson:redisson:3.19.1")
implementation("org.reflections", "reflections", "0.10.2")
testApi(kotlin("test"))
}
application {
applicationDefaultJvmArgs = listOf("-Dkotlinx.coroutines.debug", "-Duser.timezone=GMT+08")
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = JavaVersion.VERSION_17.toString()
javaParameters = true
}
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
options.compilerArgs.add("-parameters")
}
tasks.register<Delete>("clearLib") {
delete("$buildDir/libs/lib")
}
tasks.register<Copy>("copyLib") {
from(configurations.runtimeClasspath)
into("$buildDir/libs/lib")
}
tasks.jar {
dependsOn("clearLib")
dependsOn("copyLib")
exclude("**/*.jar")
manifest {
attributes["Manifest-Version"] = "1.0"
attributes["Multi-Release"] = "true"
attributes["Main-Class"] = "kurenai.imsyncbot.BotKt"
attributes["Class-Path"] =
configurations.runtimeClasspath.get().files.joinToString(" ") { "lib/${it.name}" }
}
archiveFileName.set("${rootProject.name}.jar")
}
tasks.withType<Test> {
useJUnitPlatform()
}