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
87 changes: 32 additions & 55 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ concurrency:

jobs:

# Prepare environment and build the plugin
# Prepare the environment and build the plugin
build:
name: Build
runs-on: ubuntu-latest
Expand All @@ -38,78 +38,60 @@ jobs:

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

# 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
uses: actions/setup-java@v5
with:
distribution: zulu
java-version: 21

# Setup Gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

# Set environment variables
- name: Export Properties
id: properties
shell: bash
run: |
PROPERTIES="$(./gradlew properties --console=plain -q)"
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
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
uses: gradle/actions/setup-gradle@v6

# Build plugin
- name: Build plugin
run: ./gradlew buildPlugin

# Prepare plugin archive content for creating artifact
- name: Prepare Plugin Artifact
id: artifact
shell: bash
run: |
cd ${{ github.workspace }}/build/distributions
FILENAME=`ls *.zip`
unzip "$FILENAME" -d content

echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT

# Store already-built plugin as an artifact for downloading
# Store an already-built plugin as an artifact for downloading
- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: ${{ steps.artifact.outputs.filename }}
path: ./build/distributions/content/*/*
name: plugin-distribution
path: ./build/distributions/*.zip

# Run tests and upload a code coverage report
# Run tests and upload test reports on failure
test:
name: Test
needs: [ build ]
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
uses: actions/checkout@v6

# 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
uses: actions/setup-java@v5
with:
distribution: zulu
java-version: 21

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

# Run tests
- name: Run Tests
Expand All @@ -118,7 +100,7 @@ jobs:
# Collect Tests Result of failed tests
- name: Collect Tests Result
if: ${{ failure() }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: tests-result
path: ${{ github.workspace }}/build/reports/tests
Expand All @@ -132,41 +114,36 @@ jobs:

# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
uses: jlumbroso/free-disk-space@main
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
uses: actions/checkout@v6

# 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
uses: actions/setup-java@v5
with:
distribution: zulu
java-version: 21

# Setup Gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

# Cache Plugin Verifier IDEs
- name: Setup Plugin Verifier IDEs Cache
uses: actions/cache@v4
uses: gradle/actions/setup-gradle@v6
with:
path: ${{ needs.build.outputs.pluginVerifierHomeDir }}/ides
key: plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }}
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
if: ${{ always() }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: pluginVerifier-result
path: ${{ github.workspace }}/build/reports/pluginVerifier
5 changes: 4 additions & 1 deletion .run/Run Tests.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,18 @@
</option>
<option name="taskNames">
<list>
<option value="runTestsInIJCommunity" />
<option value="check" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<ExternalSystemDebugDisabled>false</ExternalSystemDebugDisabled>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<GradleProfilingDisabled>false</GradleProfilingDisabled>
<GradleCoverageDisabled>false</GradleCoverageDisabled>
<method v="2" />
</configuration>
</component>
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

## [Unreleased]

## [1.7.0]
### Changed
- New supported IDE version range: 2026.1 and later.
- Various minor improvements and removal of deprecated API usage.

## [1.6.0]
### Changed
- Removed the until-build version, so that the plugin potentially will need less new releases when
Expand Down
29 changes: 12 additions & 17 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import org.jetbrains.changelog.Changelog
import org.jetbrains.changelog.markdownToHTML
import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
import org.jetbrains.intellij.platform.gradle.TestFrameworkType

plugins {
Expand Down Expand Up @@ -38,6 +37,7 @@ dependencies {
testImplementation(libs.junitJupiterApi)
testRuntimeOnly(libs.junitJupiterEngine)
testImplementation(libs.junitJupiterParams)
testImplementation(libs.junitPlatformLauncher)

// IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html

Expand All @@ -55,6 +55,7 @@ dependencies {
testFramework(TestFrameworkType.Platform)
//Required for 'LightJavaCodeInsightFixtureTestCase5'
testFramework(TestFrameworkType.Plugin.Java)
testFramework(TestFrameworkType.JUnit5)
}
}

Expand Down Expand Up @@ -103,22 +104,6 @@ intellijPlatform {
}
}

intellijPlatformTesting {
val runTestsInIJCommunity by intellijPlatformTesting.testIde.registering {
type = IntelliJPlatformType.IntellijIdeaCommunity
version = "2025.1"
task {
useJUnitPlatform {
isScanForTestClasses = false
include("**/*Test.class")
//Excluded due to https://github.com/picimako/mockitools/issues/69
exclude("**/MockFieldInitializationInspectionTest.class, **/StubOnlyMockInVerificationInspectionTest.class")
environment("NO_FS_ROOTS_ACCESS_CHECK", true)
}
}
}
}

// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
changelog {
groups.empty()
Expand All @@ -129,4 +114,14 @@ tasks {
wrapper {
gradleVersion = providers.gradleProperty("gradleVersion").get()
}

test {
useJUnitPlatform {
isScanForTestClasses = false
include("**/*Test.class")
//Excluded due to https://github.com/picimako/mockitools/issues/69
exclude("**/MockFieldInitializationInspectionTest.class, **/StubOnlyMockInVerificationInspectionTest.class")
environment("NO_FS_ROOTS_ACCESS_CHECK", true)
}
}
}
13 changes: 7 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@

pluginGroup = com.picimako.mockitools
pluginName = Mockitools
pluginRepositoryUrl = https://github.com/picimako/mockitools
# SemVer format -> https://semver.org
pluginVersion = 1.6.0
pluginVersion = 1.7.0

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

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

# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
Expand All @@ -21,7 +22,7 @@ platformPlugins =
platformBundledPlugins = com.intellij.java

# Gradle Releases -> https://github.com/gradle/gradle/releases
gradleVersion = 8.13
gradleVersion = 9.4.1

# Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib
kotlin.stdlib.default.dependency = false
Expand Down
14 changes: 8 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
[versions]
# libraries
junit = "4.13.2"
assertj = "3.27.3"
junitJupiter = "5.11.3"
assertj = "3.27.7"
junitJupiter = "5.14.1"
junitPlatformLauncher = "1.14.1"

# plugins
changelog = "2.2.1"
intelliJPlatform = "2.5.0"
kotlin = "2.1.20"
lombok = "8.13.1"
changelog = "2.5.0"
intelliJPlatform = "2.17.0"
kotlin = "2.3.21"
lombok = "9.5.0"

[libraries]
junit = { group = "junit", name = "junit", version.ref = "junit" }
assertj = { group = "org.assertj", name = "assertj-core", version.ref = "assertj" }
junitJupiterApi = { group = "org.junit.jupiter", name = "junit-jupiter-api", version.ref = "junitJupiter" }
junitJupiterEngine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "junitJupiter" }
junitJupiterParams = { group = "org.junit.jupiter", name = "junit-jupiter-params", version.ref = "junitJupiter" }
junitPlatformLauncher = { module = "org.junit.platform:junit-platform-launcher", version.ref = "junitPlatformLauncher" }

[plugins]
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
Expand Down
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.13-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//Copyright 2025 Tamás Balog. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
//Copyright 2026 Tamás Balog. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.

package com.picimako.mockitools;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//Copyright 2025 Tamás Balog. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
//Copyright 2026 Tamás Balog. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.

package com.picimako.mockitools;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/picimako/mockitools/Convention.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//Copyright 2025 Tamás Balog. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
//Copyright 2026 Tamás Balog. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.

package com.picimako.mockitools;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//Copyright 2025 Tamás Balog. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
//Copyright 2026 Tamás Balog. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.

package com.picimako.mockitools;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//Copyright 2025 Tamás Balog. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
//Copyright 2026 Tamás Balog. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.

package com.picimako.mockitools;

Expand Down
Loading