2
0

build.gradle.kts 3.0 KB

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