Skip to content

Commit e8e068c

Browse files
authored
version 1.1.17 for PhpStorm 2024.2 (#58)
1 parent 1a6f92c commit e8e068c

17 files changed

+96
-72
lines changed

.github/workflows/build.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
pluginVerifierHomeDir: ${{ steps.properties.outputs.pluginVerifierHomeDir }}
2222
steps:
2323

24-
# Check out current repository
24+
# Check out the current repository
2525
- name: Fetch Sources
2626
uses: actions/checkout@v4
2727

@@ -58,8 +58,6 @@ jobs:
5858
echo "$CHANGELOG" >> $GITHUB_OUTPUT
5959
echo "EOF" >> $GITHUB_OUTPUT
6060
61-
./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier
62-
6361
# Build plugin
6462
- name: Build plugin
6563
run: ./gradlew buildPlugin
@@ -77,7 +75,7 @@ jobs:
7775
- macos-latest
7876
steps:
7977

80-
# Check out current repository
78+
# Check out the current repository
8179
- name: Fetch Sources
8280
uses: actions/checkout@v4
8381

@@ -113,7 +111,7 @@ jobs:
113111
runs-on: ubuntu-latest
114112
steps:
115113

116-
# Check out current repository
114+
# Check out the current repository
117115
- name: Fetch Sources
118116
uses: actions/checkout@v4
119117

@@ -132,7 +130,7 @@ jobs:
132130

133131
# Run Verify Plugin task and IntelliJ Plugin Verifier tool
134132
- name: Run Plugin Verification tasks
135-
run: ./gradlew runPluginVerifier -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}
133+
run: ./gradlew verifyPlugin -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}
136134

137135
# Collect Plugin Verifier Result
138136
- name: Collect Plugin Verifier Result

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.DS_Store
22
.gradle
33
.idea
4+
.intellijPlatform
45
.qodana
56
build
67
src/test/fixtures/gen/

.run/Run Plugin.run.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
<DebugAllEnabled>false</DebugAllEnabled>
2222
<method v="2" />
2323
</configuration>
24-
</component>
24+
</component>

.run/Run Verifications.run.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</option>
1212
<option name="taskNames">
1313
<list>
14-
<option value="runPluginVerifier" />
14+
<option value="verifyPlugin" />
1515
</list>
1616
</option>
1717
<option name="vmOptions" value="" />

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## [Unreleased]
44

5+
## 1.1.7 — 16.09.2024
6+
7+
- Adapt code for PhpStorm 2024.2
8+
59
## 1.1.6 — 30.08.2024
610

711
- Settings menu and turn off option for modulite icons

build.gradle.kts

+54-41
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,61 @@
11
import org.jetbrains.changelog.Changelog
2-
3-
fun properties(key: String) = providers.gradleProperty(key)
2+
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
43

54
plugins {
65
id("java") // Java support
76
alias(libs.plugins.kotlin) // Kotlin support
8-
alias(libs.plugins.gradleIntelliJPlugin) // Gradle IntelliJ Plugin
7+
alias(libs.plugins.intelliJPlatform) // IntelliJ Platform Gradle Plugin
98
alias(libs.plugins.changelog) // Gradle Changelog Plugin
109
}
1110

12-
group = properties("pluginGroup").get()
13-
version = properties("pluginVersion").get()
11+
group = providers.gradleProperty("pluginGroup").get()
12+
version = providers.gradleProperty("pluginVersion").get()
13+
14+
// Set the JVM language level used to build the project.
15+
kotlin {
16+
jvmToolchain(17)
17+
}
1418

1519
// Configure project's dependencies
1620
repositories {
1721
mavenCentral()
18-
}
1922

20-
// Set the JVM language level used to build the project.
21-
kotlin {
22-
jvmToolchain(17)
23+
// IntelliJ Platform Gradle Plugin Repositories Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-repositories-extension.html
24+
intellijPlatform {
25+
defaultRepositories()
26+
}
2327
}
2428

2529
// Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog
2630
dependencies {
27-
}
31+
testImplementation("org.opentest4j:opentest4j:1.3.0") // TODO: remove in the next update
32+
testImplementation(libs.junit)
2833

29-
// Configure Gradle IntelliJ Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
30-
intellij {
31-
pluginName = properties("pluginName")
32-
version = properties("platformVersion")
33-
type = properties("platformType")
34+
// IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
35+
intellijPlatform {
36+
create(providers.gradleProperty("platformType"), providers.gradleProperty("platformVersion"))
3437

35-
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file.
36-
plugins = properties("platformPlugins").map { it.split(',').map(String::trim).filter(String::isNotEmpty) }
37-
}
38+
// Plugin Dependencies. Uses `platformBundledPlugins` property from the gradle.properties file for bundled IntelliJ Platform plugins.
39+
bundledPlugins(providers.gradleProperty("platformBundledPlugins").map { it.split(',') })
3840

39-
// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
40-
changelog {
41-
groups.empty()
42-
repositoryUrl = properties("pluginRepositoryUrl")
43-
}
41+
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file for plugin from JetBrains Marketplace.
42+
plugins(providers.gradleProperty("platformPlugins").map { it.split(',') })
4443

45-
tasks {
46-
wrapper {
47-
gradleVersion = properties("gradleVersion").get()
44+
instrumentationTools()
45+
pluginVerifier()
46+
zipSigner()
47+
testFramework(TestFrameworkType.Platform)
4848
}
49+
}
4950

50-
patchPluginXml {
51-
version = properties("pluginVersion")
52-
sinceBuild = properties("pluginSinceBuild")
53-
untilBuild = properties("pluginUntilBuild")
51+
// Configure IntelliJ Platform Gradle Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html
52+
intellijPlatform {
53+
pluginConfiguration {
54+
version = providers.gradleProperty("pluginVersion")
5455

5556
val changelog = project.changelog // local variable for configuration cache compatibility
5657
// Get the latest available change notes from the changelog file
57-
changeNotes = properties("pluginVersion").map { pluginVersion ->
58+
changeNotes = providers.gradleProperty("pluginVersion").map { pluginVersion ->
5859
with(changelog) {
5960
renderItem(
6061
(getOrNull(pluginVersion) ?: getUnreleased())
@@ -64,28 +65,40 @@ tasks {
6465
)
6566
}
6667
}
67-
}
68-
69-
runIde {
70-
maxHeapSize = "8g"
71-
}
7268

73-
buildSearchableOptions {
74-
enabled = false
69+
ideaVersion {
70+
sinceBuild = providers.gradleProperty("pluginSinceBuild")
71+
untilBuild = providers.gradleProperty("pluginUntilBuild")
72+
}
7573
}
7674

7775
sourceSets {
7876
test {
7977
resources {
80-
setSrcDirs(project.files("src/test/fixtures"))
78+
setSrcDirs(listOf("src/test/fixtures"))
8179
}
8280
}
8381
}
8482

83+
pluginVerification {
84+
ides {
85+
recommended()
86+
}
87+
}
88+
}
89+
90+
// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
91+
changelog {
92+
groups.empty()
93+
repositoryUrl = providers.gradleProperty("pluginRepositoryUrl")
94+
}
95+
96+
tasks {
8597
test {
8698
delete("src/test/fixtures/gen")
99+
}
87100

88-
setExcludes(listOf("com/vk/modulite/infrastructure/**", "com/vk/modulite/dsl/**"))
89-
isScanForTestClasses = false
101+
wrapper {
102+
gradleVersion = providers.gradleProperty("gradleVersion").get()
90103
}
91104
}

gradle.properties

+11-10
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,26 @@ pluginName = modulite
55
pluginRepositoryUrl = https://github.com/VKCOM/modulite
66

77
# SemVer format -> https://semver.org
8-
pluginVersion = 1.1.6
8+
pluginVersion = 1.1.7
99

10-
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
11-
# for insight into build numbers and IntelliJ Platform versions.
12-
pluginSinceBuild = 241
13-
pluginUntilBuild = 241.*
10+
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
11+
pluginSinceBuild = 242
12+
pluginUntilBuild = 242.*
1413

15-
# IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
14+
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
1615
platformType = IU
17-
platformVersion = 2024.1
16+
platformVersion = 2024.2
1817

1918
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
20-
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
19+
# Example: platformPlugins = com.jetbrains.php:203.4449.22, org.intellij.scala:2023.3.27@EAP
2120
# PHP Plugin - https://plugins.jetbrains.com/plugin/6610-php/versions
2221
# YAML Plugin - https://plugins.jetbrains.com/plugin/13126-yaml/versions
23-
platformPlugins = com.jetbrains.php:241.14494.240, org.jetbrains.plugins.yaml:241.14494.150
22+
platformPlugins = com.jetbrains.php:242.20224.427, org.jetbrains.plugins.yaml:242.20224.237
23+
# Example: platformBundledPlugins = com.intellij.java
24+
platformBundledPlugins = com.intellij.java
2425

2526
# Gradle Releases -> https://github.com/gradle/gradle/releases
26-
gradleVersion = 8.6
27+
gradleVersion = 8.9
2728

2829
# Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib
2930
kotlin.stdlib.default.dependency = false

gradle/libs.versions.toml

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
[versions]
22
# libraries
3+
junit = "4.13.2"
34

45
# plugins
5-
kotlin = "1.9.23"
6-
changelog = "2.2.0"
7-
gradleIntelliJPlugin = "1.17.2"
6+
changelog = "2.2.1"
7+
intelliJPlatform = "2.0.1"
8+
kotlin = "1.9.25"
89

910
[libraries]
11+
junit = { group = "junit", name = "junit", version.ref = "junit" }
1012

1113
[plugins]
12-
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
1314
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
14-
gradleIntelliJPlugin = { id = "org.jetbrains.intellij", version.ref = "gradleIntelliJPlugin" }
15+
intelliJPlatform = { id = "org.jetbrains.intellij.platform", version.ref = "intelliJPlatform" }
16+
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }

gradle/wrapper/gradle-wrapper.jar

42 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

+5-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18+
# SPDX-License-Identifier: Apache-2.0
19+
#
1820

1921
##############################################################################
2022
#
@@ -55,7 +57,7 @@
5557
# Darwin, MinGW, and NonStop.
5658
#
5759
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
60+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5961
# within the Gradle project.
6062
#
6163
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
8486
# shellcheck disable=SC2034
8587
APP_BASE_NAME=${0##*/}
8688
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87-
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90+
' "$PWD" ) || exit
8891

8992
# Use the maximum available, or set MAX_FD != -1 to use that value.
9093
MAX_FD=maximum

gradlew.bat

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
@rem See the License for the specific language governing permissions and
1414
@rem limitations under the License.
1515
@rem
16+
@rem SPDX-License-Identifier: Apache-2.0
17+
@rem
1618

1719
@if "%DEBUG%"=="" @echo off
1820
@rem ##########################################################################

src/main/kotlin/com/vk/modulite/inspections/config/UnnecessaryFullyQualifiedNameInspection.kt src/main/kotlin/com/vk/modulite/inspections/config/ModuliteUnnecessaryFullyQualifiedNameInspection.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import com.vk.modulite.utils.unquote
1212
import org.jetbrains.yaml.psi.YAMLQuotedText
1313
import org.jetbrains.yaml.psi.YamlPsiElementVisitor
1414

15-
class UnnecessaryFullyQualifiedNameInspection : ConfigInspectionBase() {
15+
class ModuliteUnnecessaryFullyQualifiedNameInspection : ConfigInspectionBase() {
1616
class QualifierQuickFix(private val prefix: String) : LocalQuickFix {
1717
override fun getFamilyName() = "Remove unnecessary qualifier"
1818

src/test/kotlin/com/vk/modulite/infrastructure/ConfigListTestBase.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import com.vk.modulite.services.ModuliteDeps
1313
import com.vk.modulite.utils.childOfType
1414
import org.jetbrains.yaml.psi.YAMLFile
1515

16-
open class ConfigListTestBase : BasePlatformTestCase() {
16+
abstract class ConfigListTestBase : BasePlatformTestCase() {
1717
protected fun doExportTest(symbol: String, before: List<String>, after: List<String>) =
1818
doListTest("export", symbol, before, after)
1919

src/test/kotlin/com/vk/modulite/infrastructure/InlayHintsProviderTestBase.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import com.intellij.testFramework.utils.inlays.InlayHintsProviderTestCase
44
import com.vk.modulite.highlighting.hints.PhpInlayTypeHintsProvider
55
import java.io.File
66

7-
open class InlayHintsProviderTestBase : InlayHintsProviderTestCase() {
7+
abstract class InlayHintsProviderTestBase : InlayHintsProviderTestCase() {
88
protected fun runHintTest(testFile: String) {
99
val testDataFolder = File(testDataPath, "hints")
1010
assertTrue(testDataFolder.exists())

src/test/kotlin/com/vk/modulite/infrastructure/IntegrationTestBase.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import com.intellij.testFramework.fixtures.BasePlatformTestCase
44
import com.vk.modulite.dsl.IntegrationTestContext
55
import com.vk.modulite.dsl.integrationTestBase
66

7-
open class IntegrationTestBase : BasePlatformTestCase() {
7+
abstract class IntegrationTestBase : BasePlatformTestCase() {
88
protected fun integrationTest(folder: String = "", init: IntegrationTestContext.() -> Unit) {
99
integrationTestBase {
1010
fixture(myFixture)

src/test/kotlin/com/vk/modulite/tests/YamlInspectionsTest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class YamlInspectionsTest : ModuliteInspectionTestBase() {
5252

5353
fun `test unnecessary fully qualified name`() {
5454
myFixture.enableInspections(InconsistentNestingInspection())
55-
myFixture.enableInspections(UnnecessaryFullyQualifiedNameInspection())
55+
myFixture.enableInspections(ModuliteUnnecessaryFullyQualifiedNameInspection())
5656
runFixture("inspections/UnnecessaryFullyQualifiedName")
5757
}
5858

0 commit comments

Comments
 (0)