@@ -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,22 +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-
40+
4141 testImplementation(kotlin(" test" ))
4242 testImplementation(libs.junit)
43-
43+
4444 // IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
4545 intellijPlatform {
4646 create(
4747 providers.gradleProperty(" platformType" ),
4848 providers.gradleProperty(" platformVersion" ),
4949 useInstaller = false ,
5050 )
51-
51+
5252 // Plugin Dependencies. Uses `platformBundledPlugins` property from the gradle.properties file for bundled IntelliJ Platform plugins.
5353 bundledPlugins(providers.gradleProperty(" platformBundledPlugins" ).map { it.split(' ,' ) })
5454 plugins(providers.gradleProperty(" platformPlugins" ).map { it.split(' ,' ) })
55-
55+
5656 pluginVerifier()
5757 zipSigner()
5858 testFramework(TestFrameworkType .Platform )
@@ -64,22 +64,22 @@ intellijPlatform {
6464 pluginConfiguration {
6565 name = providers.gradleProperty(" pluginName" )
6666 version = providers.gradleProperty(" pluginVersion" )
67-
67+
6868 // Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
6969 description = providers.fileContents(layout.projectDirectory.file(" README.md" )).asText.map {
7070 val start = " <!-- Plugin description -->"
7171 val end = " <!-- Plugin description end -->"
72-
72+
7373 with (it.lines()) {
7474 if (! containsAll(listOf (start, end))) {
7575 throw GradleException (" Plugin description section not found in README.md:\n $start ... $end " )
7676 }
7777 subList(indexOf(start) + 1 , indexOf(end)).joinToString(" \n " ).let (::markdownToHTML)
7878 }
7979 }
80-
80+
8181 val changelog = project.changelog
82-
82+
8383 // local variable for configuration cache compatibility // Get the latest available change notes from the changelog file
8484 changeNotes = providers.gradleProperty(" pluginVersion" ).map { pluginVersion ->
8585 with (changelog) {
@@ -89,34 +89,34 @@ intellijPlatform {
8989 )
9090 }
9191 }
92-
92+
9393 ideaVersion {
9494 sinceBuild = providers.gradleProperty(" pluginSinceBuild" )
9595 untilBuild = providers.gradleProperty(" pluginUntilBuild" )
9696 }
9797 }
98-
98+
9999 signing {
100100 certificateChain = providers.environmentVariable(" CERTIFICATE_CHAIN" )
101101 privateKey = providers.environmentVariable(" PRIVATE_KEY" )
102102 password = providers.environmentVariable(" PRIVATE_KEY_PASSWORD" )
103103 }
104-
104+
105105 publishing {
106106 token = providers.environmentVariable(" PUBLISH_TOKEN" )
107-
107+
108108 // The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
109109 // Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
110110 // https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
111111 channels = providers.gradleProperty(" pluginVersion" )
112112 .map { listOf (it.substringAfter(' -' , " " ).substringBefore(' .' ).ifEmpty { " default" }) }
113113 }
114-
114+
115115 pluginVerification {
116116 ides {
117117 recommended()
118118 }
119-
119+
120120 }
121121}
122122
@@ -149,22 +149,22 @@ val prepareSandboxConfig: PrepareSandboxTask.() -> Unit = {
149149
150150tasks {
151151 runIde {
152-
152+
153153 // From https://app.slack.com/client/T5P9YATH9/C5U8BM1MK
154154 // systemProperty("ide.experimental.ui", "true")
155155 // systemProperty("projectView.hide.dot.idea", "false")
156156 // systemProperty("terminal.new.ui", "false")
157157 // systemProperty("ide.tree.painter.compact.default", "true")
158158 }
159-
159+
160160 wrapper {
161161 gradleVersion = providers.gradleProperty(" gradleVersion" ).get()
162162 }
163-
163+
164164 publishPlugin {
165165 dependsOn(patchChangelog)
166166 }
167-
167+
168168 prepareSandbox(prepareSandboxConfig)
169169}
170170
@@ -190,29 +190,29 @@ tasks.withType<KotlinCompile> {
190190 )
191191 }
192192 }
193-
193+
194194 prepareSandboxTask(prepareSandboxConfig)
195-
195+
196196 plugins {
197197 robotServerPlugin(Constraints .LATEST_VERSION )
198198 }
199199}
200200
201201@Suppress(" unused" ) val runIdePyCharmProf by intellijPlatformTesting.runIde.registering {
202202 type = IntelliJPlatformType .PyCharmProfessional
203-
203+
204204 prepareSandboxTask(prepareSandboxConfig)
205205}
206206
207207@Suppress(" unused" ) val runIdePyCharmCommunityEAP by intellijPlatformTesting.runIde.registering {
208208 type = IntelliJPlatformType .PyCharmCommunity
209209 version = " LATEST-EAP-SNAPSHOT"
210-
210+
211211 prepareSandboxTask(prepareSandboxConfig)
212212}
213213
214214@Suppress(" unused" ) val runIdeIntellijIdeaC by intellijPlatformTesting.runIde.registering {
215215 type = IntelliJPlatformType .IntellijIdeaCommunity
216-
216+
217217 prepareSandboxTask(prepareSandboxConfig)
218218}
0 commit comments