build.gradle.kts 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*
  2. * Copyright 2019-2021 Mamoe Technologies and contributors.
  3. *
  4. * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
  5. * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
  6. *
  7. * https://github.com/mamoe/mirai/blob/master/LICENSE
  8. */
  9. @file:Suppress("UnusedImport")
  10. plugins {
  11. kotlin("jvm")
  12. id("java")
  13. `maven-publish`
  14. id("com.jfrog.bintray")
  15. id("org.jetbrains.intellij") version Versions.intellijGradlePlugin
  16. }
  17. repositories {
  18. maven("http://maven.aliyun.com/nexus/content/groups/public/")
  19. }
  20. version = Versions.console
  21. description = "IntelliJ plugin for Mirai Console"
  22. // See https://github.com/JetBrains/gradle-intellij-plugin/
  23. intellij {
  24. version = Versions.intellij
  25. isDownloadSources = true
  26. updateSinceUntilBuild = false
  27. setPlugins(
  28. "org.jetbrains.kotlin:${Versions.kotlinIntellijPlugin}", // @eap
  29. "java"
  30. )
  31. }
  32. tasks.getByName("publishPlugin", org.jetbrains.intellij.tasks.PublishTask::class) {
  33. val pluginKey = project.findProperty("jetbrains.hub.key")?.toString()
  34. if (pluginKey != null) {
  35. logger.info("Found jetbrains.hub.key")
  36. setToken(pluginKey)
  37. } else {
  38. logger.info("jetbrains.hub.key not found")
  39. }
  40. }
  41. tasks.withType<org.jetbrains.intellij.tasks.PatchPluginXmlTask> {
  42. sinceBuild("201.*")
  43. untilBuild("215.*")
  44. pluginDescription("""
  45. Plugin development support for <a href='https://github.com/mamoe/mirai-console'>Mirai Console</a>
  46. <h3>Features</h3>
  47. <ul>
  48. <li>Inspections for plugin properties, for example, checking PluginDescription.</li>
  49. <li>Inspections for illegal calls.</li>
  50. <li>Intentions for resolving serialization problems.</li>
  51. </ul>
  52. """.trimIndent())
  53. changeNotes("""
  54. See <a href="https://github.com/mamoe/mirai-console/releases">https://github.com/mamoe/mirai-console/releases</a>
  55. """.trimIndent())
  56. }
  57. dependencies {
  58. api(`jetbrains-annotations`)
  59. api(`kotlinx-coroutines-jdk8`)
  60. api(project(":mirai-console-compiler-common"))
  61. compileOnly(`kotlin-compiler`)
  62. compileOnly(files("libs/ide-common.jar"))
  63. }
  64. configurePublishing("mirai-console-intellij")