1+ import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
2+ import java.io.ByteArrayOutputStream
3+
14plugins {
2- id(" org.jetbrains.intellij" ) version " 1.14.2 "
5+ id(" org.jetbrains.intellij.platform " ) version " 2.2.0 "
36 id(" groovy" )
47}
58
6-
79dependencies {
810 sourceSets.named(" test" ) {
911 testImplementation(" org.codehaus.groovy:groovy-all:2.4.14" )
1012 testImplementation(" org.opentest4j:opentest4j:1.3.0" )
1113 }
14+ intellijPlatform {
15+ plugin(" com.jetbrains.php:243.21565.193" )
16+ plugin(" com.jetbrains.twig:243.21565.202" )
17+ bundledPlugin(" org.jetbrains.plugins.yaml" )
18+ bundledPlugin(" com.intellij.css" )
19+ bundledPlugin(" JavaScript" )
20+ create(" IU" ," 2024.3" )
21+ }
1222}
1323
1424buildscript {
@@ -18,44 +28,45 @@ buildscript {
1828}
1929
2030group = " com.oroplatform"
21- version = " 1.1.1"
31+ version = " 1.1.2"
32+
33+ val pathToIde = project.extra[" pathToIde" ]
34+
35+ val javaVersionOutput = ByteArrayOutputStream ()
36+ exec {
37+ commandLine = listOf (" java" , " -version" )
38+ standardOutput = javaVersionOutput
39+ errorOutput = javaVersionOutput
40+ }
2241
23- val javaLanguageVersionSetting = project.extra[" javaLanguageVersionSetting" ].toString()
42+ val javaVersionString = javaVersionOutput.toString().lines().first()
43+ val javaVersion = Regex (""" \d+""" ).find(javaVersionString)?.value?.toInt() ? : 11
2444
2545java {
2646 toolchain {
27- languageVersion.set(JavaLanguageVersion .of(javaLanguageVersionSetting ))
47+ languageVersion.set(JavaLanguageVersion .of(javaVersion ))
2848 }
2949}
3050
31- intellij {
32- pluginName.set(" idea-oroplatform-plugin" )
33- type.set(" IU" )
34- version.set(" 2024.2" )
35- plugins.set(listOf (
36- " com.jetbrains.php:242.20224.387" ,
37- " yaml" ,
38- " java-i18n" ,
39- " properties" ,
40- " css-impl" ,
41- " JavaScript" ,
42- " com.jetbrains.twig:242.20224.385"
43- ))
44- sandboxDir.set(" ${project.rootDir} /.idea-sandbox" )
51+ intellijPlatform {
52+ pluginConfiguration {
53+ name = " idea-oroplatform-plugin"
54+ }
4555}
4656
4757repositories {
4858 mavenCentral()
59+ intellijPlatform {
60+ defaultRepositories()
61+ }
62+ }
63+
64+ val runPhpStorm by intellijPlatformTesting.runIde.registering {
65+ type = IntelliJPlatformType .PhpStorm
66+ version = " 2024.3"
4967}
5068
5169tasks {
52- runIde {
53- val pathToIde = project.extra[" pathToIde" ]
54- ideDir.set(file(" $pathToIde " ))
55- }
56- buildSearchableOptions {
57- enabled = true
58- }
5970 test {
6071 // OPP-80: The tests that target PHP code completion and JS completion
6172 // or those that use the information no longer present in classes.php in the newer version of the platform
0 commit comments