This repository has been archived by the owner on Oct 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
/
build.gradle.kts
81 lines (66 loc) · 2.14 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
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
plugins {
val enableNative = false
java
id("com.github.johnrengelman.shadow") version "6.1.0"
if (enableNative) {
kotlin("multiplatform") version "1.7.20"
} else
kotlin("jvm") version "1.7.20"
}
group = "coloryr.colormirai"
version = "4.1.7"
repositories {
mavenCentral()
maven("https://repo.mirai.mamoe.net/snapshots")
}
tasks.withType(KotlinJvmCompile::class.java) {
kotlinOptions.jvmTarget = "1.8"
}
tasks.withType<JavaCompile> {
options.encoding= "utf-8"
}
dependencies {
implementation("org.apache.logging.log4j:log4j-api:2.19.0")
implementation("org.apache.logging.log4j:log4j-core:2.19.0")
implementation("com.alibaba:fastjson:2.0.21")
implementation("org.java-websocket:Java-WebSocket:1.5.3")
implementation("javax.servlet:javax.servlet-api:4.0.1")
implementation("org.jline:jline:3.21.0")
implementation("io.netty:netty-all:4.1.86.Final")
implementation("com.google.code.gson:gson:2.10")
val miraiVersion = "2.14.0"
// val miraiVersion = "2.14.0-dev-974be884"
compile("net.mamoe", "mirai-core", miraiVersion)
compile("net.mamoe", "mirai-core-utils", miraiVersion)
compile("net.mamoe", "mirai-console" , miraiVersion)
compile("net.mamoe", "mirai-console-terminal", miraiVersion)
compile("net.mamoe", "mirai-console-frontend-base", miraiVersion)
}
kotlin {
// val hostOs = System.getProperty("os.name")
// val isMingwX64 = hostOs.startsWith("Windows")
// val nativeTarget = when {
// hostOs == "Mac OS X" -> macosX64("native")
// hostOs == "Linux" -> linuxX64("native")
// isMingwX64 -> mingwX64("native")
// else -> throw GradleException("Host OS is not supported in Kotlin/Native.")
// }
//
// nativeTarget.apply {
// binaries {
// executable {
// entryPoint = "main"
// }
// }
// }
// sourceSets {
// val nativeMain by getting
// val nativeTest by getting
// }
}
tasks.withType<Jar> {
manifest {
attributes["Main-Class"] = "coloryr.colormirai.ColorMiraiMain"
}
}