cleanConf Gradle task deletes the wrong directory in projects with non-standard layout - #5621
Merged
Merged
Conversation
…n-standard layout
Gavrilov-Ivan
approved these changes
Sep 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5619
Problem
cleanConfdefaults the conf dir to${project.rootDir}/.jmix/conf, while the running application resolvesjmix.core.conf-diragainst its working directory, which forbootRunis the project directory of the application module. The two agree only whenprojectDir == rootDir. In a build where the application is a subproject with a customprojectDir,cleanConfcleans a directory nobody uses, so stale hot-deployed files in the real conf dir are never removed. A property value containing${user.dir}was also used verbatim, so the task tried to delete a directory literally named${user.dir}.Changes
JmixPlugin.resolveConfDirnow returns aFileproduced byproject.file(...), so every path resolves againstprojectDir: the default becomes<projectDir>/.jmix/conf, a relative property value resolves againstprojectDir, an absolute one is used as is, and the${user.dir}and${user.home}placeholders are expanded before resolution. Nothing changes for single-module and composite-build projects.Tests
CleanConfFunctionalTestwith a fixture that reproduces the layout (include ':app'plus a customprojectDir) covers the default, relative, absolute and${user.dir}cases. The default and placeholder cases fail without the fix. Verified green: the wholejmix-gradle-pluginsuite, 17 tests, with-PincludeSlowTests=true.Note for reviewers: this aligns
cleanConfwithgradlew bootRunand the application module root. It does not match the current Studio run configuration, which uses the IntelliJ project base dir as the working directory — that is the Studio-side part of #5517.