gradle-completion icon indicating copy to clipboard operation
gradle-completion copied to clipboard

Support projects without a buildfile in the root

Open alcarraz opened this issue 3 years ago • 0 comments

Valid multi project builds may not have a build file in the root project, and the current code does not generate autocomplete information for tasks if the build file is not found. It assumes the directory is not an initialized gradle project. See #137.

This PR is a possible solution for this problem, is what I did, so I can use it. It works by not requiring the build file if the settings file is found.

Then, the call to the gradle executable is performed by path, instead of by build file in that case. Is the fix that I found less disruptive, but may not be ideal. It will create the cache as if the build file build.gradle.kts was present. This should not cause any trouble, but it is somehow weird. Another option would be to set the name for the cache directory, based on the project directory path.

Anyway, this PR is here just to illustrate more what was mentioned in issue #137, but I'm willing to perform modifications to make it better if this is considered a valid path.

Issue: #137

alcarraz avatar Apr 14 '23 03:04 alcarraz