2
0

studio-plugin.gradle.kts 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. import org.jetbrains.changelog.Changelog
  2. import org.jetbrains.changelog.markdownToHTML
  3. import org.jetbrains.intellij.platform.gradle.TestFrameworkType
  4. plugins {
  5. id("java")
  6. // alias(libs.plugins.kotlin)
  7. alias(libs.plugins.intellij.platform)
  8. alias(libs.plugins.changelog)
  9. alias(libs.plugins.qodana)
  10. alias(libs.plugins.kover)
  11. alias(libs.plugins.gradle.ktlint)
  12. }
  13. group = providers.gradleProperty("pluginGroup").get()
  14. version = providers.gradleProperty("pluginVersion").get()
  15. //kotlin {
  16. // jvmToolchain(17)
  17. //}
  18. repositories {
  19. mavenLocal()
  20. mavenCentral()
  21. intellijPlatform {
  22. defaultRepositories()
  23. localPlatformArtifacts()
  24. }
  25. }
  26. dependencies {
  27. intellijPlatform {
  28. // androidStudio("2025.1.1")
  29. create(
  30. providers.gradleProperty("platformType"),
  31. providers.gradleProperty("platformVersion")
  32. )
  33. bundledPlugins(providers.gradleProperty("platformBundledPlugins").map {
  34. it.split(',')
  35. })
  36. plugins(providers.gradleProperty("platformPlugins").map {
  37. it.split(',')
  38. })
  39. // testFramework(TestFrameworkType.Platform)
  40. }
  41. }
  42. intellijPlatform {
  43. pluginConfiguration {
  44. name = providers.gradleProperty("pluginName")
  45. version = providers.gradleProperty("pluginVersion")
  46. description = providers.gradleProperty("pluginDescription")
  47. val changelog = project.changelog
  48. changeNotes = providers.gradleProperty("pluginVersion").map { pluginVersion ->
  49. with(changelog) {
  50. renderItem(
  51. (getOrNull(pluginVersion) ?: getUnreleased())
  52. .withHeader(false)
  53. .withEmptySections(false),
  54. Changelog.OutputType.HTML,
  55. )
  56. }
  57. }
  58. ideaVersion {
  59. sinceBuild = providers.gradleProperty("pluginSinceBuild")
  60. untilBuild = providers.gradleProperty("pluginUntilBuild")
  61. }
  62. }
  63. pluginVerification {
  64. ides {
  65. recommended()
  66. }
  67. }
  68. }
  69. changelog {
  70. groups.empty()
  71. repositoryUrl = providers.gradleProperty("pluginRepositoryUrl")
  72. }
  73. kover {
  74. reports {
  75. total {
  76. xml {
  77. onCheck = true
  78. }
  79. }
  80. }
  81. }
  82. tasks {
  83. // wrapper {
  84. // gradleVersion = providers.gradleProperty("gradleVersion").get()
  85. // }
  86. publishPlugin {
  87. dependsOn(patchChangelog)
  88. }
  89. }
  90. intellijPlatformTesting {
  91. runIde {
  92. register("runIdeForUiTests") {
  93. task {
  94. jvmArgumentProviders += CommandLineArgumentProvider {
  95. listOf(
  96. "-Drobot-server.port=8082",
  97. "-Dide.mac.message.dialogs.as.sheets=false",
  98. "-Djb.privacy.policy.text=<!--999.999-->",
  99. "-Djb.consents.confirmation.enabled=false",
  100. )
  101. }
  102. }
  103. plugins {
  104. robotServerPlugin()
  105. }
  106. }
  107. }
  108. }