Skip to content

Commit 0f8bd9b

Browse files
committed
updated the plugin to the latest plugin structure
Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
1 parent 1ef4629 commit 0f8bd9b

File tree

3 files changed

+59
-38
lines changed

3 files changed

+59
-38
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@ dist/
44
bin
55
cty
66
wasm/wasm
7+
8+
# IntelliJ Plugin
9+
intellij-plugin/.intellijPlatform/
10+
intellij-plugin/build/
11+
intellij-plugin/.gradle/

intellij-plugin/build.gradle.kts

Lines changed: 34 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,48 @@
11
plugins {
22
id("java")
3-
id("org.jetbrains.kotlin.jvm") version "2.0.21"
4-
id("org.jetbrains.intellij") version "1.17.3"
3+
alias(libs.plugins.kotlin)
4+
alias(libs.plugins.intelliJPlatform)
55
}
66

77
group = "com.skarlso"
8-
version = "1.0.0"
8+
version = "1.0.2"
99

1010
repositories {
1111
mavenCentral()
12+
intellijPlatform {
13+
defaultRepositories()
14+
}
1215
}
1316

14-
intellij {
15-
version.set("2025.1.3")
16-
type.set("IC") // IntelliJ IDEA Community Edition
17+
dependencies {
18+
implementation(libs.snakeyaml)
19+
20+
testImplementation(libs.junit)
21+
testImplementation(libs.mockito.core)
22+
testImplementation(libs.mockito.inline)
1723

18-
plugins.set(listOf(
19-
"com.intellij.java",
20-
"org.jetbrains.plugins.yaml"
21-
))
24+
intellijPlatform {
25+
intellijIdeaCommunity("2025.1.3")
26+
bundledPlugins("com.intellij.java", "org.jetbrains.plugins.yaml")
27+
testFramework(org.jetbrains.intellij.platform.gradle.TestFrameworkType.Platform)
28+
}
29+
}
30+
31+
intellijPlatform {
32+
pluginConfiguration {
33+
version = providers.gradleProperty("pluginVersion").orElse("1.0.2")
34+
description = """
35+
Generate sample YAML files from Kubernetes Custom Resource Definitions.
36+
37+
Right-click on CRD YAML files to access the CRD to Sample YAML menu.
38+
Generate complete, minimal, or commented samples. Validate existing samples against CRD schemas.
39+
""".trimIndent()
40+
41+
ideaVersion {
42+
sinceBuild = "251"
43+
untilBuild = "251.*"
44+
}
45+
}
2246
}
2347

2448
tasks {
@@ -32,32 +56,4 @@ tasks {
3256
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
3357
}
3458
}
35-
36-
patchPluginXml {
37-
sinceBuild.set("251")
38-
untilBuild.set("251.*")
39-
}
40-
41-
signPlugin {
42-
certificateChain.set(System.getenv("CERTIFICATE_CHAIN"))
43-
privateKey.set(System.getenv("PRIVATE_KEY"))
44-
password.set(System.getenv("PRIVATE_KEY_PASSWORD"))
45-
}
46-
47-
publishPlugin {
48-
token.set(System.getenv("PUBLISH_TOKEN"))
49-
}
50-
51-
// Disable problematic buildSearchableOptions task for newer versions
52-
buildSearchableOptions {
53-
enabled = false
54-
}
55-
}
56-
57-
dependencies {
58-
implementation("org.yaml:snakeyaml:2.2")
59-
60-
testImplementation("junit:junit:4.13.2")
61-
testImplementation("org.mockito:mockito-core:5.7.0")
62-
testImplementation("org.mockito:mockito-inline:5.2.0")
6359
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[versions]
2+
# IntelliJ Platform
3+
intelliJPlatform = "2.6.0"
4+
kotlin = "2.0.21"
5+
6+
# Dependencies
7+
junit = "4.13.2"
8+
mockito = "5.7.0"
9+
mockito-inline = "5.2.0"
10+
snakeyaml = "2.2"
11+
12+
[libraries]
13+
junit = { group = "junit", name = "junit", version.ref = "junit" }
14+
mockito-core = { group = "org.mockito", name = "mockito-core", version.ref = "mockito" }
15+
mockito-inline = { group = "org.mockito", name = "mockito-inline", version.ref = "mockito-inline" }
16+
snakeyaml = { group = "org.yaml", name = "snakeyaml", version.ref = "snakeyaml" }
17+
18+
[plugins]
19+
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
20+
intelliJPlatform = { id = "org.jetbrains.intellij.platform", version.ref = "intelliJPlatform" }

0 commit comments

Comments
 (0)