1+ import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
2+ import org.jetbrains.intellij.platform.gradle.models.ProductRelease
13import org.jetbrains.kotlin.gradle.dsl.JvmTarget
24import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
5+ import java.io.FileInputStream
6+ import java.util.Properties
37
48plugins {
5- application
69 id(" java" )
710 id(" org.jetbrains.kotlin.jvm" ) version " 2.1.0"
811 id(" org.jetbrains.intellij.platform" ) version " 2.5.0"
912}
1013
1114group = " io.github.bytebeats"
12- version = " 2.1 .0"
15+ version = " 2.2 .0"
1316
1417repositories {
1518 maven {
@@ -53,10 +56,20 @@ intellijPlatform {
5356 v2.1.0 upgrade mns with Java 21 and Idea 2025.1.<br>
5457 """ .trimIndent()
5558 }
56- }
5759
58- application {
59- mainClass = " me.bytebeats.mns.ui.MainWindow"
60+ pluginVerification {
61+ ides {
62+ ide(IntelliJPlatformType .IntellijIdeaCommunity , " 2024.3.6" )
63+ local(file(project.localProperty(" plugin.verifier.ide.location" )))
64+ recommended()
65+ select {
66+ types = listOf (IntelliJPlatformType .IntellijIdeaCommunity , IntelliJPlatformType .AndroidStudio )
67+ channels = listOf (ProductRelease .Channel .RELEASE )
68+ sinceBuild = " 242"
69+ untilBuild = " 251.*"
70+ }
71+ }
72+ }
6073}
6174
6275tasks {
@@ -84,9 +97,7 @@ tasks {
8497 }
8598
8699 register<Copy >(" MoveBuildArtifacts" ) {
87- dependsOn(named(" distZip" ))
88100 mustRunAfter(" DeletePluginFiles" )
89- println (" Moving Build Artifacts!" )
90101 from(layout.buildDirectory.dir(" distributions" ))
91102 include(" mns-$version .zip" )
92103 into(" plugins" )
@@ -95,7 +106,13 @@ tasks {
95106 register<Delete >(" DeletePluginFiles" ) {
96107 delete(files(" plugins" ))
97108 }
98- named(" build " ) {
109+ named(" signPlugin " ) {
99110 finalizedBy(" MoveBuildArtifacts" )
100111 }
112+ }
113+
114+ fun Project.localProperty (key : String , from : String = "local.properties"): String {
115+ val properties = Properties ()
116+ properties.load(FileInputStream (rootProject.file(from)))
117+ return properties.getProperty(key)
101118}
0 commit comments