generated from project-mirai/mirai-console-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 16
/
build.gradle.kts
42 lines (36 loc) · 1019 Bytes
/
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
plugins {
kotlin("jvm") version "1.7.10"
kotlin("plugin.serialization") version "1.7.10"
id("net.mamoe.mirai-console") version "2.13.4"
id("me.him188.maven-central-publish") version "1.0.0"
}
group = "net.mamoe"
version = "0.6.0"
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)
}
}
}
mavenCentralPublish {
githubProject("project-mirai", "chat-command")
licenseAGplV3()
developer("Mamoe Technologies")
publication {
artifact(tasks.getByName("buildPlugin"))
}
}