Skip to content

Commit 30132d4

Browse files
committed
Update Gradle IJ plugin to IJP Gradle plugin
1 parent acce2ea commit 30132d4

File tree

5 files changed

+51
-27
lines changed

5 files changed

+51
-27
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,7 @@ dist/
2020
.cxx
2121
local.properties
2222

23-
.kotlin
23+
.kotlin
24+
25+
# IntelliJ Platform Gradle Plugin cache
26+
.intellijPlatform

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pluginVersion = 1.0.16
99
pluginSinceBuild = 243
1010
pluginUntilBuild = 263.*
1111

12-
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
12+
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin.html
1313
platformType = IC
1414

1515
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
kotlin = "2.0.20"
33
compose = "1.6.11"
44
agp = "8.2.0"
5-
intellij-plugin = "1.17.4"
5+
intellij-platform-plugin = "2.10.5"
66
changelog = "2.1.0"
77
intellij-platform = "2024.3"
88

99
[plugins]
1010
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
1111
kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
1212
jetbrainsCompose = { id = "org.jetbrains.compose", version.ref = "compose" }
13-
jetbrainsIntellij = { id = "org.jetbrains.intellij", version.ref = "intellij-plugin" }
13+
intellijPlatform = { id = "org.jetbrains.intellij.platform", version.ref = "intellij-platform-plugin" }
1414
jetbrainsChangelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
1515
composeCompiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }

ideaPlugin/build.gradle.kts

Lines changed: 43 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,20 @@ plugins {
44
alias(libs.plugins.kotlinJvm)
55
alias(libs.plugins.jetbrainsCompose)
66
alias(libs.plugins.composeCompiler)
7-
alias(libs.plugins.jetbrainsIntellij)
7+
alias(libs.plugins.intellijPlatform)
88
alias(libs.plugins.jetbrainsChangelog)
99
}
1010

1111
version = properties("pluginVersion").get()
1212

13+
repositories {
14+
mavenCentral()
15+
16+
intellijPlatform {
17+
defaultRepositories()
18+
}
19+
}
20+
1321
dependencies {
1422
implementation(compose.desktop.linux_x64) {
1523
exclude(group = "org.jetbrains.kotlinx")
@@ -26,37 +34,49 @@ dependencies {
2634
implementation(project(":shared")) {
2735
exclude(group = "org.jetbrains.kotlinx")
2836
}
29-
}
3037

31-
intellij {
32-
pluginName = properties("pluginName").get()
33-
version = libs.versions.intellij.platform.get()
34-
type = properties("platformType").get()
38+
intellijPlatform {
39+
intellijIdea("2025.1")
40+
}
3541
}
3642

37-
tasks {
38-
buildSearchableOptions {
39-
enabled = false
40-
}
41-
patchPluginXml {
43+
intellijPlatform {
44+
pluginConfiguration {
45+
name = properties("pluginName").get()
4246
version = properties("pluginVersion").get()
43-
sinceBuild = properties("pluginSinceBuild").get()
44-
untilBuild = properties("pluginUntilBuild").get()
45-
46-
changeNotes.set("""
47-
<ul>
48-
<li>Bumped IntelliJ plugin versions (min: 243.*, max: 263.*)</li>
49-
<li>Compose Desktop dependencies to 1.6.11</li>
50-
<li>Exclude coroutines for IJ plugin to avoid class loader conflicts with Compose</li>
51-
</ul>
52-
""")
47+
48+
ideaVersion {
49+
sinceBuild = properties("pluginSinceBuild").get()
50+
untilBuild = properties("pluginUntilBuild").get()
51+
}
52+
53+
changeNotes = """
54+
<ul>
55+
<li>Bumped IntelliJ plugin versions (min: 243, max: 263.*)</li>
56+
<li>Compose Desktop dependencies to 1.6.11</li>
57+
<li>Exclude coroutines for IJ plugin to avoid class loader conflicts with Compose</li>
58+
</ul>
59+
"""
5360
}
61+
62+
buildSearchableOptions = false
5463
}
5564

5665
kotlin {
57-
jvmToolchain(17)
66+
jvmToolchain(21)
5867
}
5968

6069
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
61-
kotlinOptions.jvmTarget = "17"
70+
compilerOptions {
71+
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21)
72+
}
73+
}
74+
75+
// Skip tasks that require JBR download
76+
tasks.named("buildSearchableOptions") {
77+
enabled = false
78+
}
79+
80+
tasks.named("jarSearchableOptions") {
81+
enabled = false
6282
}

settings.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ pluginManagement {
55
google()
66
}
77
}
8+
89
rootProject.name = "ModifiersPlayground"
910

1011
include(":shared")

0 commit comments

Comments
 (0)