-
Notifications
You must be signed in to change notification settings - Fork 282
Description
What happened?
On Windows, run gradlew clean buildPlugin test via a run config in IntelliJ, not via the command line. After that, the build\idea-sandbox\IC-2024.3.6\plugins-test\IntelliJ Platform Plugin Template\lib\junit-4.13.2.jar file is locked until you stop or kill the Gradle daemon. You can try to run gradlew clean or simply delete the file by hand: it will fail, saying the file is still opened by another process.
Please note this lock is created only if you run the Gradle task via a Run Config in your IDE, on Windows. There is no issue if you run from the command line.
Also, this happens only with the intellij platform plugin versions 2.7.0 and 2.6.0. There is no problem with the intellij platform plugin versions 2.1.0 and 2.5.0. So, I don't know if this issue is related to the plugin or the IDE. Maybe both? I can only say this bug appeared with the plugin version 2.6.0, and version 2.7.0 is still affected.
I checked the JVM Arguments and the System Properties via VisualVM when running the Gradle task from a Run Config and from the command line, but they're similar.
Relevant log output or stack trace
Reusing configuration cache.
> Task :checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :clean FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':clean'.
> java.io.IOException: Unable to delete directory 'C:\Downloads\intellij-platform-plugin-template\build'
Failed to delete some children. This might happen because a process has files open or has its working directory set in the target directory.
- C:\Downloads\intellij-platform-plugin-template\build\idea-sandbox\IC-2024.3.6\plugins-test\IntelliJ Platform Plugin Template\lib\junit-4.13.2.jar
- C:\Downloads\intellij-platform-plugin-template\build\idea-sandbox\IC-2024.3.6\plugins-test\IntelliJ Platform Plugin Template\lib
- C:\Downloads\intellij-platform-plugin-template\build\idea-sandbox\IC-2024.3.6\plugins-test\IntelliJ Platform Plugin Template
- C:\Downloads\intellij-platform-plugin-template\build\idea-sandbox\IC-2024.3.6\plugins-test
- C:\Downloads\intellij-platform-plugin-template\build\idea-sandbox\IC-2024.3.6
- C:\Downloads\intellij-platform-plugin-template\build\idea-sandbox
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 3s
1 actionable task: 1 executed
Configuration cache entry reused.Steps to reproduce
on Windows:
- clone the https://github.com/JetBrains/intellij-platform-plugin-template project
- be sure the
intelliJPlatformproperty is set to 2.7.0 ingradle/libs.versions.toml - run
gradlew clean buildPlugin testvia a Run Config in IntelliJ, not via the command line:
- run
gradlew clean buildPlugin test(or justgradlew clean) a second time. This time, it can be via a run config in IntelliJ, or via the command line
The first gradlew clean buildPlugin test runs fine, but the second time it says it cannot delete the build\idea-sandbox\IC-2024.3.6\plugins-test\IntelliJ Platform Plugin Template\lib\junit-4.13.2.jar file. This file is still opened or locked.
To unlock this file, you have to stop the Gradle daemon (gradlew -stop).
IntelliJ:
IntelliJ IDEA 2025.1.4.1 (Ultimate Edition)
Build #IU-251.27812.49, built on July 24, 2025
Source revision: 735cc3bd3c92f
Gradle IntelliJ Plugin version
2.7.0
Gradle version
8.14.3
Operating System
Windows 10 x64
Link to build, i.e. failing GitHub Action job
No response