1
+ import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
2
+ import org.jetbrains.intellij.platform.gradle.models.ProductRelease
1
3
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2
4
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
5
+ import java.io.FileInputStream
6
+ import java.util.Properties
3
7
4
8
plugins {
5
- application
6
9
id(" java" )
7
10
id(" org.jetbrains.kotlin.jvm" ) version " 2.1.0"
8
- id(" org.jetbrains.intellij.platform" ) version " 2.5 .0"
11
+ id(" org.jetbrains.intellij.platform" ) version " 2.6 .0"
9
12
}
10
13
11
14
apply (plugin = " kotlin" )
@@ -43,10 +46,6 @@ dependencies {
43
46
}
44
47
}
45
48
46
- application {
47
- mainClass = " me.bytebeats.jsonmaster.ui.JsonMasterWindow"
48
- }
49
-
50
49
// Configure Gradle IntelliJ Plugin
51
50
// Read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
52
51
intellijPlatform {
@@ -62,6 +61,20 @@ intellijPlatform {
62
61
v1.4.0 regular upgrade to Java 21 and Idea 2025.<br>
63
62
""" .trimIndent()
64
63
}
64
+
65
+ pluginVerification {
66
+ ides {
67
+ ide(IntelliJPlatformType .IntellijIdeaCommunity , " 2024.3.6" )
68
+ local(file(project.localProperty(" plugin.verifier.ide.location" )))
69
+ recommended()
70
+ select {
71
+ types = listOf (IntelliJPlatformType .IntellijIdeaCommunity , IntelliJPlatformType .AndroidStudio )
72
+ channels = listOf (ProductRelease .Channel .RELEASE )
73
+ sinceBuild = " 242"
74
+ untilBuild = " 251.*"
75
+ }
76
+ }
77
+ }
65
78
}
66
79
67
80
tasks {
@@ -74,6 +87,10 @@ tasks {
74
87
compilerOptions.jvmTarget.set(JvmTarget .JVM_21 )
75
88
}
76
89
90
+ buildSearchableOptions {
91
+ enabled = false
92
+ }
93
+
77
94
signPlugin {
78
95
certificateChain.set(System .getenv(" CERTIFICATE_CHAIN" ))
79
96
privateKey.set(System .getenv(" PRIVATE_KEY" ))
@@ -89,18 +106,23 @@ tasks {
89
106
}
90
107
91
108
register<Copy >(" MoveBuildArtifacts" ) {
92
- dependsOn(named(" distZip" ))
93
109
mustRunAfter(" DeletePluginFiles" )
94
110
println (" Moving Build Artifacts!" )
95
111
from(layout.buildDirectory.dir(" distributions" ))
96
- include(" Json Master -$version .zip" )
112
+ include(" JsonMaster -$version .zip" )
97
113
into(" plugins" )
98
114
}
99
115
100
116
register<Delete >(" DeletePluginFiles" ) {
101
117
delete(files(" plugins" ))
102
118
}
103
- named(" build " ) {
119
+ named(" signPlugin " ) {
104
120
finalizedBy(" MoveBuildArtifacts" )
105
121
}
122
+ }
123
+
124
+ fun Project.localProperty (key : String , from : String = "local.properties"): String {
125
+ val properties = Properties ()
126
+ properties.load(FileInputStream (rootProject.file(from)))
127
+ return properties.getProperty(key)
106
128
}
0 commit comments