|
1 | 1 | plugins { |
2 | | - id("java") |
3 | | - id("org.jetbrains.kotlin.jvm") version "1.9.25" |
4 | | - id("org.jetbrains.intellij") version "1.17.4" |
| 2 | + id("java") |
| 3 | + id("org.jetbrains.kotlin.jvm") version "1.9.25" |
| 4 | + id("org.jetbrains.intellij.platform") version "2.3.0" |
5 | 5 | } |
6 | 6 |
|
7 | 7 | group = "com.github.junkfactory" |
8 | 8 | version = providers.gradleProperty("pluginVersion").get() |
9 | 9 |
|
10 | 10 | repositories { |
11 | | - mavenCentral() |
| 11 | + mavenCentral() |
| 12 | + intellijPlatform { |
| 13 | + defaultRepositories(); |
| 14 | + } |
12 | 15 | } |
13 | 16 |
|
14 | | -// Configure Gradle IntelliJ Plugin |
15 | | -// Read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html |
16 | | -intellij { |
17 | | - version.set("2024.1.7") |
18 | | - type.set("IC") // Target IDE Platform |
| 17 | +dependencies { |
| 18 | + intellijPlatform { |
| 19 | + create("IC", "2025.1") |
| 20 | + testFramework(org.jetbrains.intellij.platform.gradle.TestFrameworkType.Platform) |
| 21 | + |
| 22 | + // Add necessary plugin dependencies for compilation here, example: |
| 23 | + bundledPlugin("com.intellij.java") |
| 24 | + } |
| 25 | +} |
19 | 26 |
|
20 | | - plugins.set(listOf("com.intellij.java")) |
| 27 | +intellijPlatform { |
| 28 | + pluginConfiguration { |
| 29 | + ideaVersion { |
| 30 | + sinceBuild = "242" |
| 31 | + } |
| 32 | + } |
21 | 33 | } |
22 | 34 |
|
| 35 | +// Configure Gradle IntelliJ Plugin |
| 36 | +// Read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html |
23 | 37 | tasks { |
24 | | - // Set the JVM compatibility versions |
25 | | - withType<JavaCompile> { |
26 | | - sourceCompatibility = "17" |
27 | | - targetCompatibility = "17" |
28 | | - } |
29 | | - withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> { |
30 | | - kotlinOptions.jvmTarget = "17" |
31 | | - } |
32 | | - |
33 | | - patchPluginXml { |
34 | | - sinceBuild.set("241") |
35 | | - untilBuild.set("251.*") |
36 | | - } |
37 | | - |
38 | | - signPlugin { |
39 | | - certificateChain.set(System.getenv("CERTIFICATE_CHAIN")) |
40 | | - privateKey.set(System.getenv("PRIVATE_KEY")) |
41 | | - password.set(System.getenv("PRIVATE_KEY_PASSWORD")) |
42 | | - } |
43 | | - |
44 | | - publishPlugin { |
45 | | - token.set(System.getenv("PUBLISH_TOKEN")) |
46 | | - } |
| 38 | + // Set the JVM compatibility versions |
| 39 | + withType<JavaCompile> { |
| 40 | + sourceCompatibility = "21" |
| 41 | + targetCompatibility = "21" |
| 42 | + } |
| 43 | + withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> { |
| 44 | + kotlinOptions.jvmTarget = "21" |
| 45 | + } |
| 46 | + |
| 47 | + patchPluginXml { |
| 48 | + sinceBuild.set("242") |
| 49 | + untilBuild.set("252.*") |
| 50 | + } |
| 51 | + |
| 52 | + signPlugin { |
| 53 | + certificateChain.set(System.getenv("CERTIFICATE_CHAIN")) |
| 54 | + privateKey.set(System.getenv("PRIVATE_KEY")) |
| 55 | + password.set(System.getenv("PRIVATE_KEY_PASSWORD")) |
| 56 | + } |
| 57 | + |
| 58 | + publishPlugin { |
| 59 | + token.set(System.getenv("PUBLISH_TOKEN")) |
| 60 | + } |
47 | 61 | } |
0 commit comments