chore: use application plugin instead of MANIFEST attribute
This commit is contained in:
1 file changed
+6
-9
+6
-9
@@ -4,6 +4,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.kotlin)
|
alias(libs.plugins.kotlin)
|
||||||
alias(libs.plugins.shadow)
|
alias(libs.plugins.shadow)
|
||||||
|
id("application")
|
||||||
}
|
}
|
||||||
|
|
||||||
val fancyBotVersion: String by project
|
val fancyBotVersion: String by project
|
||||||
@@ -51,15 +52,6 @@ tasks.jar {
|
|||||||
enabled = false
|
enabled = false
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.shadowJar {
|
|
||||||
manifest {
|
|
||||||
attributes(
|
|
||||||
"Main-Class" to "cn.rtast.fancybot.FancyBotKt",
|
|
||||||
"Manifest-Version" to "1.0"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register("deployBot") {
|
tasks.register("deployBot") {
|
||||||
val apiKey = System.getenv("MCSM_API_KEY")
|
val apiKey = System.getenv("MCSM_API_KEY")
|
||||||
val apiUrl = System.getenv("MCSM_API_URL")
|
val apiUrl = System.getenv("MCSM_API_URL")
|
||||||
@@ -67,3 +59,8 @@ tasks.register("deployBot") {
|
|||||||
val instanceId = System.getenv("MCSM_INSTANCE_ID")
|
val instanceId = System.getenv("MCSM_INSTANCE_ID")
|
||||||
MCSMDeploy(apiUrl, apiKey, daemonId, instanceId).deploy(file("build/libs/FancyBot-1.0.0-all.jar"))
|
MCSMDeploy(apiUrl, apiKey, daemonId, instanceId).deploy(file("build/libs/FancyBot-1.0.0-all.jar"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
application {
|
||||||
|
mainClass = "cn.rtast.fancybot.FancyBotKt"
|
||||||
|
applicationName = "FancyBot"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user