-
Notifications
You must be signed in to change notification settings - Fork 16
/
build.gradle.kts
59 lines (49 loc) · 1.66 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
plugins {
kotlin("jvm") version "1.4.0"
kotlin("plugin.serialization") version "1.4.0"
}
group = "org.itxtech"
version = "1.0.1"
kotlin {
sourceSets {
all {
languageSettings.enableLanguageFeature("InlineClasses")
languageSettings.useExperimentalAnnotation("kotlin.Experimental")
}
}
}
repositories {
maven("https://mirrors.huaweicloud.com/repository/maven")
maven("https://dl.bintray.com/him188moe/mirai")
maven("https://dl.bintray.com/kotlin/kotlin-eap")
}
dependencies {
api("org.jetbrains.kotlinx:atomicfu:0.14.4")
implementation(kotlin("script-runtime"))
implementation(kotlin("script-util"))
implementation(kotlin("compiler-embeddable"))
implementation(kotlin("scripting-compiler-embeddable"))
implementation(kotlin("scripting-compiler-impl-embeddable"))
implementation("org.jetbrains.intellij.deps:trove4j:1.0.20200330")
implementation("net.mamoe:mirai-core:1.2.2")
implementation("net.mamoe:mirai-console:1.0-M3")
}
tasks.named<Jar>("jar") {
manifest {
attributes["Name"] = "iTXTech MiraiKts"
attributes["Revision"] = Runtime.getRuntime().exec("git rev-parse --short HEAD")
.inputStream.bufferedReader().readText().trim()
}
val list = ArrayList<Any>()
configurations.compileClasspath.get().forEach { file ->
arrayOf("kotlin-script", "kotlin-compiler", "kotlin-daemon", "trove").forEach {
if (file.absolutePath.contains(it)) {
list.add(zipTree(file))
}
}
}
from(list)
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}