Skip to content

Problem with multiproject without build.gradle in root. #137

@alcarraz

Description

@alcarraz

Hi, this was working wonderfully for me until now, thank you for the great work.

I started a multi project build according to Structuring and Building a Software Component with Gradle
and it doesn't have a build.gradle in the project root. The gradle init command doesn't generate a build.gradle in the project root, either.

In that case, the gradle-completion doesn't find the build file and defaults to assuming it is not an initialized gradle project, giving only the common options.

Maybe it can be assumed that if the settings file is found, the project is initialized, even if the build file is not found? I'm willing to add a PR, or a patch, if I manage to solve this and it works.

I found a workaround for this creating an empty build.gradle, but before that, well I'll tell the story because it may be worthy to add a warning or something in the README.md about that.

There is also the possibility that the script works, and somehow I did something to break it, in that case, please excuse me and let me know.

To reproduce, try this:

mkdir test-project
cd test-project
gradle init # select application, java, **yes** on multiple subprojects, groovy.

And then try to autocomplete gradle there. It will only show the default tasks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions