mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-11 02:50:15 +08:00
41d0c16ad1
* Add project wizard * Add OptionsStep * Template application fundamentals * Extract BuildSystemType from BuildSystemStep to top-level * Complete templates * Fix build * Fix build * Support Java and Groovy, fix strings in Kotlin templates * Add template for gradle.properties * Disable `depends on` field * Fix Java template * Fix build * Update tools/compiler-annotations/src/CheckerConstants.kt Co-authored-by: Karlatemp <karlatemp@vip.qq.com> * Update tools/intellij-plugin/src/creator/steps/ValidationUtil.kt Co-authored-by: Karlatemp <karlatemp@vip.qq.com> Co-authored-by: Karlatemp <karlatemp@vip.qq.com>
27 lines
790 B
Plaintext
27 lines
790 B
Plaintext
package $PACKAGE_NAME
|
|
|
|
import net.mamoe.mirai.console.plugin.jvm.JvmPluginDescription
|
|
import net.mamoe.mirai.console.plugin.jvm.KotlinPlugin
|
|
import net.mamoe.mirai.utils.info
|
|
#set($HAS_DETAILS = ${PLUGIN_AUTHOR} != "" || ${PLUGIN_DEPENDS_ON} != "" || ${PLUGIN_INFO} != "")
|
|
object $CLASS_NAME : KotlinPlugin(
|
|
JvmPluginDescription(
|
|
id = "${PLUGIN_ID}",
|
|
#if(${PLUGIN_NAME} != "")name = "${PLUGIN_NAME}",
|
|
#end
|
|
version = "${PLUGIN_VERSION}",
|
|
) #if($HAS_DETAILS){
|
|
#end
|
|
#if(${PLUGIN_AUTHOR} != "")author("${PLUGIN_AUTHOR}")
|
|
#end
|
|
#if(${PLUGIN_DEPENDS_ON} != "")dependsOn("${PLUGIN_DEPENDS_ON}")
|
|
#end
|
|
#if(${PLUGIN_INFO} != "")info("""${PLUGIN_INFO}""")
|
|
#end
|
|
#if($HAS_DETAILS) }
|
|
#end
|
|
) {
|
|
override fun onEnable() {
|
|
logger.info { "Plugin loaded" }
|
|
}
|
|
} |