@@ -32,7 +32,7 @@ kotlin {
32
32
// Configure project's dependencies
33
33
repositories {
34
34
mavenCentral()
35
-
35
+
36
36
// IntelliJ Platform Gradle Plugin Repositories Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-repositories-extension.html
37
37
intellijPlatform {
38
38
defaultRepositories()
@@ -42,22 +42,22 @@ repositories {
42
42
// Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog
43
43
dependencies {
44
44
compileOnly(libs.kotlinxSerialization)
45
-
45
+
46
46
testImplementation(kotlin(" test" ))
47
47
testImplementation(libs.junit)
48
-
48
+
49
49
// IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
50
50
intellijPlatform {
51
51
create(
52
52
providers.gradleProperty(" platformType" ),
53
53
providers.gradleProperty(" platformVersion" ),
54
54
useInstaller = false ,
55
55
)
56
-
56
+
57
57
// Plugin Dependencies. Uses `platformBundledPlugins` property from the gradle.properties file for bundled IntelliJ Platform plugins.
58
58
bundledPlugins(providers.gradleProperty(" platformBundledPlugins" ).map { it.split(' ,' ) })
59
59
plugins(providers.gradleProperty(" platformPlugins" ).map { it.split(' ,' ) })
60
-
60
+
61
61
pluginVerifier()
62
62
zipSigner()
63
63
testFramework(TestFrameworkType .Platform )
@@ -69,22 +69,22 @@ intellijPlatform {
69
69
pluginConfiguration {
70
70
name = providers.gradleProperty(" pluginName" )
71
71
version = providers.gradleProperty(" pluginVersion" )
72
-
72
+
73
73
// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
74
74
description = providers.fileContents(layout.projectDirectory.file(" README.md" )).asText.map {
75
75
val start = " <!-- Plugin description -->"
76
76
val end = " <!-- Plugin description end -->"
77
-
77
+
78
78
with (it.lines()) {
79
79
if (! containsAll(listOf (start, end))) {
80
80
throw GradleException (" Plugin description section not found in README.md:\n $start ... $end " )
81
81
}
82
82
subList(indexOf(start) + 1 , indexOf(end)).joinToString(" \n " ).let (::markdownToHTML)
83
83
}
84
84
}
85
-
85
+
86
86
val changelog = project.changelog
87
-
87
+
88
88
// local variable for configuration cache compatibility // Get the latest available change notes from the changelog file
89
89
changeNotes = providers.gradleProperty(" pluginVersion" ).map { pluginVersion ->
90
90
with (changelog) {
@@ -94,29 +94,29 @@ intellijPlatform {
94
94
)
95
95
}
96
96
}
97
-
97
+
98
98
ideaVersion {
99
99
sinceBuild = providers.gradleProperty(" pluginSinceBuild" )
100
100
untilBuild = providers.gradleProperty(" pluginUntilBuild" )
101
101
}
102
102
}
103
-
103
+
104
104
signing {
105
105
certificateChain = providers.environmentVariable(" CERTIFICATE_CHAIN" )
106
106
privateKey = providers.environmentVariable(" PRIVATE_KEY" )
107
107
password = providers.environmentVariable(" PRIVATE_KEY_PASSWORD" )
108
108
}
109
-
109
+
110
110
publishing {
111
111
token = providers.environmentVariable(" PUBLISH_TOKEN" )
112
-
112
+
113
113
// The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
114
114
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
115
115
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
116
116
channels = providers.gradleProperty(" pluginVersion" )
117
117
.map { listOf (it.substringAfter(' -' , " " ).substringBefore(' .' ).ifEmpty { " default" }) }
118
118
}
119
-
119
+
120
120
pluginVerification {
121
121
failureLevel = listOf (INVALID_PLUGIN , COMPATIBILITY_PROBLEMS , MISSING_DEPENDENCIES )
122
122
verificationReportsFormats = listOf (MARKDOWN , PLAIN )
@@ -130,7 +130,7 @@ intellijPlatform {
130
130
)
131
131
}
132
132
}
133
-
133
+
134
134
}
135
135
}
136
136
@@ -163,22 +163,22 @@ val prepareSandboxConfig: PrepareSandboxTask.() -> Unit = {
163
163
164
164
tasks {
165
165
runIde {
166
-
166
+
167
167
// From https://app.slack.com/client/T5P9YATH9/C5U8BM1MK
168
168
// systemProperty("ide.experimental.ui", "true")
169
169
// systemProperty("projectView.hide.dot.idea", "false")
170
170
// systemProperty("terminal.new.ui", "false")
171
171
// systemProperty("ide.tree.painter.compact.default", "true")
172
172
}
173
-
173
+
174
174
wrapper {
175
175
gradleVersion = providers.gradleProperty(" gradleVersion" ).get()
176
176
}
177
-
177
+
178
178
publishPlugin {
179
179
dependsOn(patchChangelog)
180
180
}
181
-
181
+
182
182
prepareSandbox(prepareSandboxConfig)
183
183
}
184
184
@@ -204,29 +204,32 @@ tasks.withType<KotlinCompile> {
204
204
)
205
205
}
206
206
}
207
-
207
+
208
208
prepareSandboxTask(prepareSandboxConfig)
209
-
209
+
210
210
plugins {
211
211
robotServerPlugin(Constraints .LATEST_VERSION )
212
212
}
213
213
}
214
214
215
215
@Suppress(" unused" ) val runIdePyCharmProf by intellijPlatformTesting.runIde.registering {
216
216
type = IntelliJPlatformType .PyCharmProfessional
217
-
217
+
218
218
prepareSandboxTask(prepareSandboxConfig)
219
219
}
220
220
221
221
@Suppress(" unused" ) val runIdePyCharmCommunityEAP by intellijPlatformTesting.runIde.registering {
222
222
type = IntelliJPlatformType .PyCharmCommunity
223
223
version = " LATEST-EAP-SNAPSHOT"
224
-
224
+
225
225
prepareSandboxTask(prepareSandboxConfig)
226
226
}
227
227
228
228
@Suppress(" unused" ) val runIdeIntellijIdeaC by intellijPlatformTesting.runIde.registering {
229
229
type = IntelliJPlatformType .IntellijIdeaCommunity
230
-
230
+ plugins {
231
+ plugin(" PythonCore:251.23774.435" )
232
+ }
233
+
231
234
prepareSandboxTask(prepareSandboxConfig)
232
235
}
0 commit comments