Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 38 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Build

on:
# Trigger the workflow on pushes to only the 'master' branch (this avoids duplicate checks being run e.g., for dependabot pull requests)
push:
branches: [ master ]
# Trigger the workflow on any pull request
pull_request:

concurrency:
Expand All @@ -11,30 +12,32 @@ concurrency:

jobs:

# Prepare environment and build the plugin
# Prepare the environment and build the plugin
build:
name: Build
runs-on: ubuntu-latest
outputs:
version: ${{ steps.properties.outputs.version }}
changelog: ${{ steps.properties.outputs.changelog }}
pluginVerifierHomeDir: ${{ steps.properties.outputs.pluginVerifierHomeDir }}
steps:

# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
uses: jlumbroso/free-disk-space@v1.3.1
with:
tool-cache: false
large-packages: false

# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v4

# Validate wrapper
- name: Gradle Wrapper Validation
uses: gradle/actions/wrapper-validation@v3

# Set up Java environment for the next steps
# Set up the Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
java-version: 21

# Setup Gradle
- name: Setup Gradle
Expand All @@ -50,8 +53,6 @@ jobs:
CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)"

echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT

echo "changelog<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
Expand All @@ -60,7 +61,7 @@ jobs:
- name: Build plugin
run: ./gradlew buildPlugin

# Run tests
# Run tests and upload a code coverage report
test:
name: Test (${{ matrix.os }})
needs: [ build ]
Expand All @@ -73,20 +74,30 @@ jobs:
- macos-latest
steps:

# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
uses: jlumbroso/free-disk-space@v1.3.1
if: runner.os == 'Linux'
with:
tool-cache: false
large-packages: false

# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v4

# Set up Java environment for the next steps
# Set up the Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
java-version: 21

# Setup Gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: true

# Run tests
- name: Run Tests
Expand All @@ -97,7 +108,7 @@ jobs:
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: tests-result
name: tests-result-${{ matrix.os }}
path: ${{ github.workspace }}/build/reports/tests

# Run plugin structure verification along with IntelliJ Plugin Verifier
Expand All @@ -107,24 +118,33 @@ jobs:
runs-on: ubuntu-latest
steps:

# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
uses: jlumbroso/free-disk-space@v1.3.1
with:
tool-cache: false
large-packages: false

# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v4

# Set up Java environment for the next steps
# Set up the Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
java-version: 21

# Setup Gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: true

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

# Collect Plugin Verifier Result
- name: Collect Plugin Verifier Result
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
.qodana
build
src/test/fixtures/gen/
.kotlin
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

## 1.1.10 - 04.08.2025

- Adapt code for PhpStorm 2025.1

## 1.1.9 - 31.07.2025

- Fix `UninitializedPropertyAccessException` in some cases
Expand Down
25 changes: 21 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ plugins {
alias(libs.plugins.kotlin) // Kotlin support
alias(libs.plugins.intelliJPlatform) // IntelliJ Platform Gradle Plugin
alias(libs.plugins.changelog) // Gradle Changelog Plugin
alias(libs.plugins.kover) // Gradle Kover Plugin
}

group = providers.gradleProperty("pluginGroup").get()
version = providers.gradleProperty("pluginVersion").get()

// Set the JVM language level used to build the project.
kotlin {
jvmToolchain(17)
jvmToolchain(21)
}

// Configure project's dependencies
Expand All @@ -29,6 +30,7 @@ repositories {
// Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog
dependencies {
testImplementation(libs.junit)
testImplementation(libs.opentest4j)

// IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
intellijPlatform {
Expand All @@ -40,16 +42,14 @@ dependencies {
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file for plugin from JetBrains Marketplace.
plugins(providers.gradleProperty("platformPlugins").map { it.split(',') })

instrumentationTools()
pluginVerifier()
zipSigner()
testFramework(TestFrameworkType.Platform)
}
}

// Configure IntelliJ Platform Gradle Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html
intellijPlatform {
pluginConfiguration {
name = providers.gradleProperty("pluginName")
version = providers.gradleProperty("pluginVersion")

val changelog = project.changelog // local variable for configuration cache compatibility
Expand Down Expand Up @@ -92,6 +92,23 @@ changelog {
repositoryUrl = providers.gradleProperty("pluginRepositoryUrl")
}

// Configure Gradle Kover Plugin - read more: https://github.com/Kotlin/kotlinx-kover#configuration
kover {
reports {
total {
xml {
onCheck = true
}
}
}

currentProject {
instrumentation {
excludedClasses.add("org.apache.velocity.*")
}
}
}

tasks {
test {
delete("src/test/fixtures/gen")
Expand Down
17 changes: 8 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,24 @@ pluginName = modulite
pluginRepositoryUrl = https://github.com/VKCOM/modulite

# SemVer format -> https://semver.org
pluginVersion = 1.1.9
pluginVersion = 1.1.10

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 243
pluginUntilBuild = 243.*
pluginSinceBuild = 251
pluginUntilBuild = 251.*

# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
platformType = IU
platformVersion = 2024.3
platformType = PS
platformVersion = 2025.1

# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.jetbrains.php:203.4449.22, org.intellij.scala:2023.3.27@EAP
# PHP Plugin - https://plugins.jetbrains.com/plugin/6610-php/versions
platformPlugins = com.jetbrains.php:243.21565.211
platformPlugins =
# Example: platformBundledPlugins = com.intellij.java
platformBundledPlugins = com.intellij.java, org.jetbrains.plugins.yaml
platformBundledPlugins = com.jetbrains.php, org.jetbrains.plugins.yaml, Git4Idea

# Gradle Releases -> https://github.com/gradle/gradle/releases
gradleVersion = 8.10.2
gradleVersion = 8.14.3

# Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib
kotlin.stdlib.default.dependency = false
Expand Down
10 changes: 7 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
[versions]
# libraries
junit = "4.13.2"
opentest4j = "1.3.0"

# plugins
changelog = "2.2.1"
intelliJPlatform = "2.0.1" # TODO: update this in next update: https://youtrack.jetbrains.com/issue/MP-7019
kotlin = "1.9.25"
changelog = "2.3.0"
intelliJPlatform = "2.7.0"
kotlin = "2.2.0"
kover = "0.9.1"

[libraries]
junit = { group = "junit", name = "junit", version.ref = "junit" }
opentest4j = { group = "org.opentest4j", name = "opentest4j", version.ref = "opentest4j" }

[plugins]
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
intelliJPlatform = { id = "org.jetbrains.intellij.platform", version.ref = "intelliJPlatform" }
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
9 changes: 4 additions & 5 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
}

rootProject.name = "modulite"
3 changes: 3 additions & 0 deletions src/main/kotlin/com/vk/modulite/actions/NewModuliteAction.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.vk.modulite.actions

import com.intellij.icons.AllIcons
import com.intellij.openapi.actionSystem.ActionUpdateThread
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.CommonDataKeys
Expand All @@ -16,4 +17,6 @@ class NewModuliteAction : AnAction(
val folder = e.getData(CommonDataKeys.VIRTUAL_FILE) ?: return
ModuliteBuilder(project).startBuild(folder, fromSource = false)
}

override fun getActionUpdateThread() = ActionUpdateThread.BGT
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.vk.modulite.actions

import com.intellij.icons.AllIcons
import com.intellij.openapi.actionSystem.ActionUpdateThread
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.CommonDataKeys
Expand Down Expand Up @@ -35,4 +36,6 @@ class NewModuliteFromFolderAction : AnAction(
return
}
}

override fun getActionUpdateThread() = ActionUpdateThread.BGT
}
Loading
Loading