Skip to content

Commit cd052a7

Browse files
authored
Fixing deprecated issues, updating plugins and platform version. (#1413)
1 parent c9b6288 commit cd052a7

File tree

10 files changed

+309
-346
lines changed

10 files changed

+309
-346
lines changed

Src/CSharpier.Rider/build.gradle.kts

Lines changed: 32 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -6,101 +6,48 @@ fun properties(key: String) = project.findProperty(key).toString()
66
plugins {
77
id("java")
88
id("org.jetbrains.kotlin.jvm") version "1.9.21"
9-
id("org.jetbrains.intellij") version "1.17.0"
9+
id("org.jetbrains.intellij.platform") version "2.2.0"
1010
id("org.jetbrains.changelog") version "2.2.0"
1111
id("org.jetbrains.qodana") version "0.1.13"
12-
id("com.jetbrains.rdgen") version "2023.3.2"
12+
id("com.jetbrains.rdgen") version "2024.3.1"
1313
}
1414

15-
group = properties("pluginGroup")
16-
version = properties("pluginVersion")
17-
18-
// Configure project's dependencies
1915
repositories {
2016
mavenCentral()
21-
}
22-
23-
// Configure Gradle IntelliJ Plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
24-
intellij {
25-
pluginName.set(properties("pluginName"))
26-
version.set(properties("platformVersion"))
27-
type.set(properties("platformType"))
28-
29-
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file.
30-
plugins.set(properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty))
31-
}
32-
33-
// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
34-
changelog {
35-
version.set(properties("pluginVersion"))
36-
groups.set(emptyList())
37-
}
38-
39-
// Configure Gradle Qodana Plugin - read more: https://github.com/JetBrains/gradle-qodana-plugin
40-
qodana {
41-
cachePath.set(projectDir.resolve(".qodana").canonicalPath)
42-
reportPath.set(projectDir.resolve("build/reports/inspections").canonicalPath)
43-
saveReport.set(true)
44-
showReport.set(System.getenv("QODANA_SHOW_REPORT")?.toBoolean() ?: false)
45-
}
46-
47-
tasks {
48-
runIde {
49-
maxHeapSize = "1500m"
50-
// maybe autoReloadPlugins = false
51-
}
52-
53-
wrapper {
54-
gradleVersion = properties("gradleVersion")
55-
}
56-
57-
patchPluginXml {
58-
version.set(properties("pluginVersion"))
59-
sinceBuild.set(properties("pluginSinceBuild"))
60-
untilBuild.set("")
61-
62-
// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
63-
pluginDescription.set(
64-
projectDir.resolve("README.md").readText().lines().run {
65-
val start = "<!-- Plugin description -->"
66-
val end = "<!-- Plugin description end -->"
67-
68-
if (!containsAll(listOf(start, end))) {
69-
throw GradleException("Plugin description section not found in README.md:\n$start ... $end")
70-
}
71-
subList(indexOf(start) + 1, indexOf(end))
72-
}.joinToString("\n").run { markdownToHTML(this) }
73-
)
74-
75-
// Get the latest available change notes from the changelog file
76-
changeNotes.set(provider {
77-
changelog.run {
78-
getOrNull(properties("pluginVersion")) ?: getLatest()
79-
}.toHTML()
80-
})
17+
intellijPlatform {
18+
defaultRepositories()
8119
}
20+
}
8221

83-
// Configure UI tests plugin
84-
// Read more: https://github.com/JetBrains/intellij-ui-test-robot
85-
runIdeForUiTests {
86-
systemProperty("robot-server.port", "8082")
87-
systemProperty("ide.mac.message.dialogs.as.sheets", "false")
88-
systemProperty("jb.privacy.policy.text", "<!--999.999-->")
89-
systemProperty("jb.consents.confirmation.enabled", "false")
22+
intellijPlatform {
23+
tasks {
24+
buildPlugin {
25+
archiveVersion = properties("pluginVersion")
26+
}
9027
}
91-
92-
signPlugin {
93-
certificateChain.set(System.getenv("CERTIFICATE_CHAIN"))
94-
privateKey.set(System.getenv("PRIVATE_KEY"))
95-
password.set(System.getenv("PRIVATE_KEY_PASSWORD"))
28+
pluginConfiguration {
29+
name = "csharpier"
30+
group = "com.intellij.csharpier"
31+
ideaVersion.sinceBuild.set(properties("pluginSinceBuild"))
32+
description = getProjectDescription()
33+
version = properties("pluginVersion")
9634
}
35+
}
9736

98-
publishPlugin {
99-
dependsOn("patchChangelog")
100-
token.set(System.getenv("PUBLISH_TOKEN"))
101-
// pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
102-
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
103-
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
104-
channels.set(listOf(properties("pluginVersion").split('-').getOrElse(1) { "default" }.split('.').first()))
37+
dependencies {
38+
intellijPlatform {
39+
create("RD", properties("platformVersion"))
10540
}
10641
}
42+
43+
fun getProjectDescription(): String {
44+
return projectDir.resolve("README.md").readText().lines().run {
45+
val start = "<!-- Plugin description -->"
46+
val end = "<!-- Plugin description end -->"
47+
48+
if (!containsAll(listOf(start, end))) {
49+
throw GradleException("Plugin description section not found in README.md:\n$start ... $end")
50+
}
51+
subList(indexOf(start) + 1, indexOf(end))
52+
}.joinToString("\n").run { markdownToHTML(this) }
53+
}
Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,11 @@
1-
# IntelliJ Platform Artifacts Repositories
2-
# -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html
3-
4-
pluginGroup = com.intellij.csharpier
5-
pluginName = csharpier
61
pluginVersion = 1.8.3
72

83
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
9-
# for insight into build numbers and IntelliJ Platform versions.
104
pluginSinceBuild = 222
115

12-
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
13-
platformType = RD
14-
platformVersion = 2024.1
15-
16-
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
17-
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
18-
platformPlugins =
6+
platformVersion = 2024.3
197

20-
# Gradle Releases -> https://github.com/gradle/gradle/releases
218
gradleVersion = 8.5
229

2310
kotlin.stdlib.default.dependency = false
11+
kotlin.daemon.jvmargs=-Xmx4000m
-15.7 KB
Binary file not shown.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
46
zipStoreBase=GRADLE_USER_HOME
57
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)