11import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
22import org.jetbrains.intellij.platform.gradle.TestFrameworkType
3+ import org.jetbrains.intellij.platform.gradle.models.ProductRelease
4+ import org.jetbrains.intellij.platform.gradle.tasks.BuildSearchableOptionsTask
5+ import org.jetbrains.intellij.platform.gradle.tasks.InstrumentCodeTask
36
47plugins {
58
69 id ' org.jetbrains.intellij.platform' version " $intellijGradlePluginVersion "
710 id ' org.jetbrains.changelog' version " $changelogVersion "
811}
912
10- intellijPlatform {
11- pluginVerification {
12- ides {
13- ide(IntelliJPlatformType.IntellijIdeaCommunity , " 2025.2" )
14- }
15- }
16- }
1713
1814apply plugin : ' org.jetbrains.changelog'
1915
@@ -27,10 +23,11 @@ changelog {
2723 groups = []
2824}
2925
26+
3027tasks {
3128 patchPluginXml {
32- sinceBuild = ' 243 '
33- untilBuild = ' 252.* '
29+ sinceBuild = ideaBuildVersion
30+ untilBuild = null
3431 changeNotes = changelog. getLatest(). toHTML() + " <a href=\" https://github.com/PANTHEONtech/YANGinator/blob/master/CHANGELOG.md\" >more...</a>"
3532 }
3633}
@@ -60,16 +57,57 @@ repositories {
6057 mavenCentral()
6158 intellijPlatform {
6259 defaultRepositories()
60+ intellijDependencies()
61+
62+ snapshots()
63+ jetbrainsRuntime()
6364 }
6465}
6566
6667dependencies {
6768 intellijPlatform {
68- intellijIdeaCommunity ideaVersion
69+ create( IntelliJPlatformType.IntellijIdea , ideaVersion)
6970 bundledPlugin(" com.intellij.java" )
70- testFramework TestFrameworkType.Platform . INSTANCE
71+ testFramework(TestFrameworkType.Platform . INSTANCE )
72+
73+ pluginVerifier()
74+ javaCompiler()
7175 }
7276
7377 testImplementation group : ' org.junit.jupiter' ,
7478 name : ' junit-jupiter-engine' , version : jupiterEngineVersion
7579}
80+
81+ /**
82+ * IntelliJ Platform Configuration
83+ * * note: The 'recommended()' verification target downloads multiple IDE distributions
84+ * (latest stable, EAP, and previous major versions). This ensures broad compatibility
85+ * but requires significant disk space and network bandwidth.
86+ * * maintenance: To optimize build performance and storage, keep 'sinceBuild' aligned
87+ * with the target SDK version found in 'Help -> About' or the JetBrains Release Portal.
88+ * * @see https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html
89+ */
90+ intellijPlatform {
91+ buildSearchableOptions = false
92+ instrumentCode = true
93+
94+ pluginConfiguration {
95+ id = ' tech.pantheon.yanginator'
96+ name = ' YANGinator'
97+ ideaVersion {
98+ sinceBuild = ideaBuildVersion
99+ untilBuild = null
100+ }
101+ }
102+
103+ pluginVerification {
104+ ides {
105+ // recommended()
106+ select {
107+ it. types = [IntelliJPlatformType.IntellijIdea ]
108+ it. channels = [ProductRelease.Channel . RELEASE , ProductRelease.Channel . EAP ]
109+ it. sinceBuild = ideaBuildVersion
110+ }
111+ }
112+ }
113+ }
0 commit comments