forked from project-mirai/chat-command
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
40 lines (34 loc) · 874 Bytes
/
build.gradle.kts
File metadata and controls
40 lines (34 loc) · 874 Bytes
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
plugins {
kotlin("jvm") version "1.7.10"
kotlin("plugin.serialization") version "1.7.10"
id("net.mamoe.mirai-console") version "2.13.4"
}
group = "net.mamoe"
version = "0.5.1"
mirai {
publishing {
repo = "mirai"
packageName = "chat-command"
override = true
}
}
repositories {
mavenLocal()
mavenCentral()
}
kotlin {
explicitApi()
sourceSets.forEach { it.languageSettings.optIn("kotlin.RequiresOptIn") }
}
tasks.create("buildCiJar", Jar::class) {
dependsOn("buildPlugin")
doLast {
val buildPluginTask = tasks.getByName("buildPlugin", Jar::class)
val buildPluginFile = buildPluginTask.archiveFile.get().asFile
project.buildDir.resolve("ci").also {
it.mkdirs()
}.resolve("chat-command.jar").let {
buildPluginFile.copyTo(it, true)
}
}
}