@@ -27,7 +27,7 @@ kotlin {
2727// Configure project's dependencies
2828repositories {
2929 mavenCentral()
30-
30+
3131 // IntelliJ Platform Gradle Plugin Repositories Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-repositories-extension.html
3232 intellijPlatform {
3333 defaultRepositories()
@@ -37,28 +37,22 @@ repositories {
3737// Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog
3838dependencies {
3939 compileOnly(libs.kotlinxSerialization)
40-
41- // implementation(libs.lsp4j)
42- implementation(libs.lsp4jdebug) {
43- exclude(group = " org.eclipse.lsp4j" , module = " org.eclipse.lsp4j.jsonrpc" )
44- exclude(group = " com.google.code.gson" , module = " gson" )
45- }
46-
40+
4741 testImplementation(kotlin(" test" ))
4842 testImplementation(libs.junit)
49-
43+
5044 // IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
5145 intellijPlatform {
5246 create(
5347 providers.gradleProperty(" platformType" ),
5448 providers.gradleProperty(" platformVersion" ),
5549 useInstaller = false ,
5650 )
57-
51+
5852 // Plugin Dependencies. Uses `platformBundledPlugins` property from the gradle.properties file for bundled IntelliJ Platform plugins.
5953 bundledPlugins(providers.gradleProperty(" platformBundledPlugins" ).map { it.split(' ,' ) })
6054 plugins(providers.gradleProperty(" platformPlugins" ).map { it.split(' ,' ) })
61-
55+
6256 pluginVerifier()
6357 zipSigner()
6458 testFramework(TestFrameworkType .Platform )
@@ -70,22 +64,22 @@ intellijPlatform {
7064 pluginConfiguration {
7165 name = providers.gradleProperty(" pluginName" )
7266 version = providers.gradleProperty(" pluginVersion" )
73-
67+
7468 // Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
7569 description = providers.fileContents(layout.projectDirectory.file(" README.md" )).asText.map {
7670 val start = " <!-- Plugin description -->"
7771 val end = " <!-- Plugin description end -->"
78-
72+
7973 with (it.lines()) {
8074 if (! containsAll(listOf (start, end))) {
8175 throw GradleException (" Plugin description section not found in README.md:\n $start ... $end " )
8276 }
8377 subList(indexOf(start) + 1 , indexOf(end)).joinToString(" \n " ).let (::markdownToHTML)
8478 }
8579 }
86-
80+
8781 val changelog = project.changelog
88-
82+
8983 // local variable for configuration cache compatibility // Get the latest available change notes from the changelog file
9084 changeNotes = providers.gradleProperty(" pluginVersion" ).map { pluginVersion ->
9185 with (changelog) {
@@ -95,34 +89,34 @@ intellijPlatform {
9589 )
9690 }
9791 }
98-
92+
9993 ideaVersion {
10094 sinceBuild = providers.gradleProperty(" pluginSinceBuild" )
10195 untilBuild = providers.gradleProperty(" pluginUntilBuild" )
10296 }
10397 }
104-
98+
10599 signing {
106100 certificateChain = providers.environmentVariable(" CERTIFICATE_CHAIN" )
107101 privateKey = providers.environmentVariable(" PRIVATE_KEY" )
108102 password = providers.environmentVariable(" PRIVATE_KEY_PASSWORD" )
109103 }
110-
104+
111105 publishing {
112106 token = providers.environmentVariable(" PUBLISH_TOKEN" )
113-
107+
114108 // The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
115109 // Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
116110 // https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
117111 channels = providers.gradleProperty(" pluginVersion" )
118112 .map { listOf (it.substringAfter(' -' , " " ).substringBefore(' .' ).ifEmpty { " default" }) }
119113 }
120-
114+
121115 pluginVerification {
122116 ides {
123117 recommended()
124118 }
125-
119+
126120 }
127121}
128122
@@ -155,22 +149,22 @@ val prepareSandboxConfig: PrepareSandboxTask.() -> Unit = {
155149
156150tasks {
157151 runIde {
158-
152+
159153 // From https://app.slack.com/client/T5P9YATH9/C5U8BM1MK
160154 // systemProperty("ide.experimental.ui", "true")
161155 // systemProperty("projectView.hide.dot.idea", "false")
162156 // systemProperty("terminal.new.ui", "false")
163157 // systemProperty("ide.tree.painter.compact.default", "true")
164158 }
165-
159+
166160 wrapper {
167161 gradleVersion = providers.gradleProperty(" gradleVersion" ).get()
168162 }
169-
163+
170164 publishPlugin {
171165 dependsOn(patchChangelog)
172166 }
173-
167+
174168 prepareSandbox(prepareSandboxConfig)
175169}
176170
@@ -196,22 +190,22 @@ tasks.withType<KotlinCompile> {
196190 )
197191 }
198192 }
199-
193+
200194 prepareSandboxTask(prepareSandboxConfig)
201-
195+
202196 plugins {
203197 robotServerPlugin(Constraints .LATEST_VERSION )
204198 }
205199}
206200
207201@Suppress(" unused" ) val runIdePyCharmProf by intellijPlatformTesting.runIde.registering {
208202 type = IntelliJPlatformType .PyCharmProfessional
209-
203+
210204 prepareSandboxTask(prepareSandboxConfig)
211205}
212206
213207@Suppress(" unused" ) val runIdeIntellijIdeaC by intellijPlatformTesting.runIde.registering {
214208 type = IntelliJPlatformType .IntellijIdeaCommunity
215-
209+
216210 prepareSandboxTask(prepareSandboxConfig)
217211}
0 commit comments