@@ -27,7 +27,7 @@ kotlin {
27
27
// Configure project's dependencies
28
28
repositories {
29
29
mavenCentral()
30
-
30
+
31
31
// IntelliJ Platform Gradle Plugin Repositories Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-repositories-extension.html
32
32
intellijPlatform {
33
33
defaultRepositories()
@@ -37,28 +37,22 @@ repositories {
37
37
// Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog
38
38
dependencies {
39
39
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
+
47
41
testImplementation(kotlin(" test" ))
48
42
testImplementation(libs.junit)
49
-
43
+
50
44
// IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
51
45
intellijPlatform {
52
46
create(
53
47
providers.gradleProperty(" platformType" ),
54
48
providers.gradleProperty(" platformVersion" ),
55
49
useInstaller = false ,
56
50
)
57
-
51
+
58
52
// Plugin Dependencies. Uses `platformBundledPlugins` property from the gradle.properties file for bundled IntelliJ Platform plugins.
59
53
bundledPlugins(providers.gradleProperty(" platformBundledPlugins" ).map { it.split(' ,' ) })
60
54
plugins(providers.gradleProperty(" platformPlugins" ).map { it.split(' ,' ) })
61
-
55
+
62
56
pluginVerifier()
63
57
zipSigner()
64
58
testFramework(TestFrameworkType .Platform )
@@ -70,22 +64,22 @@ intellijPlatform {
70
64
pluginConfiguration {
71
65
name = providers.gradleProperty(" pluginName" )
72
66
version = providers.gradleProperty(" pluginVersion" )
73
-
67
+
74
68
// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
75
69
description = providers.fileContents(layout.projectDirectory.file(" README.md" )).asText.map {
76
70
val start = " <!-- Plugin description -->"
77
71
val end = " <!-- Plugin description end -->"
78
-
72
+
79
73
with (it.lines()) {
80
74
if (! containsAll(listOf (start, end))) {
81
75
throw GradleException (" Plugin description section not found in README.md:\n $start ... $end " )
82
76
}
83
77
subList(indexOf(start) + 1 , indexOf(end)).joinToString(" \n " ).let (::markdownToHTML)
84
78
}
85
79
}
86
-
80
+
87
81
val changelog = project.changelog
88
-
82
+
89
83
// local variable for configuration cache compatibility // Get the latest available change notes from the changelog file
90
84
changeNotes = providers.gradleProperty(" pluginVersion" ).map { pluginVersion ->
91
85
with (changelog) {
@@ -95,34 +89,34 @@ intellijPlatform {
95
89
)
96
90
}
97
91
}
98
-
92
+
99
93
ideaVersion {
100
94
sinceBuild = providers.gradleProperty(" pluginSinceBuild" )
101
95
untilBuild = providers.gradleProperty(" pluginUntilBuild" )
102
96
}
103
97
}
104
-
98
+
105
99
signing {
106
100
certificateChain = providers.environmentVariable(" CERTIFICATE_CHAIN" )
107
101
privateKey = providers.environmentVariable(" PRIVATE_KEY" )
108
102
password = providers.environmentVariable(" PRIVATE_KEY_PASSWORD" )
109
103
}
110
-
104
+
111
105
publishing {
112
106
token = providers.environmentVariable(" PUBLISH_TOKEN" )
113
-
107
+
114
108
// The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
115
109
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
116
110
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
117
111
channels = providers.gradleProperty(" pluginVersion" )
118
112
.map { listOf (it.substringAfter(' -' , " " ).substringBefore(' .' ).ifEmpty { " default" }) }
119
113
}
120
-
114
+
121
115
pluginVerification {
122
116
ides {
123
117
recommended()
124
118
}
125
-
119
+
126
120
}
127
121
}
128
122
@@ -155,22 +149,22 @@ val prepareSandboxConfig: PrepareSandboxTask.() -> Unit = {
155
149
156
150
tasks {
157
151
runIde {
158
-
152
+
159
153
// From https://app.slack.com/client/T5P9YATH9/C5U8BM1MK
160
154
// systemProperty("ide.experimental.ui", "true")
161
155
// systemProperty("projectView.hide.dot.idea", "false")
162
156
// systemProperty("terminal.new.ui", "false")
163
157
// systemProperty("ide.tree.painter.compact.default", "true")
164
158
}
165
-
159
+
166
160
wrapper {
167
161
gradleVersion = providers.gradleProperty(" gradleVersion" ).get()
168
162
}
169
-
163
+
170
164
publishPlugin {
171
165
dependsOn(patchChangelog)
172
166
}
173
-
167
+
174
168
prepareSandbox(prepareSandboxConfig)
175
169
}
176
170
@@ -196,22 +190,22 @@ tasks.withType<KotlinCompile> {
196
190
)
197
191
}
198
192
}
199
-
193
+
200
194
prepareSandboxTask(prepareSandboxConfig)
201
-
195
+
202
196
plugins {
203
197
robotServerPlugin(Constraints .LATEST_VERSION )
204
198
}
205
199
}
206
200
207
201
@Suppress(" unused" ) val runIdePyCharmProf by intellijPlatformTesting.runIde.registering {
208
202
type = IntelliJPlatformType .PyCharmProfessional
209
-
203
+
210
204
prepareSandboxTask(prepareSandboxConfig)
211
205
}
212
206
213
207
@Suppress(" unused" ) val runIdeIntellijIdeaC by intellijPlatformTesting.runIde.registering {
214
208
type = IntelliJPlatformType .IntellijIdeaCommunity
215
-
209
+
216
210
prepareSandboxTask(prepareSandboxConfig)
217
211
}
0 commit comments