Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support projects without build.gradle #4594

Merged
merged 1 commit into from
Sep 8, 2022

Conversation

sdedic
Copy link
Member

@sdedic sdedic commented Sep 7, 2022

A multiproject build looks, according to the documentation like

├── app
│   ...
│   └── build.gradle
└── settings.gradle

there's no build.gradle in the root. While GradleFiles.isSubProject already works OK with build-less projects, the isRootProject does not. This PR fixes that. Simple test added.

During other work, I've realized that the ProjectFactory2 implementation for both Gradle and Maven do not return project type -- although they could. The display name is not that easy to evaluate, but both project types use a fixed ID, so it's simple to return.

@sdedic sdedic self-assigned this Sep 7, 2022
@sdedic sdedic added kind:bug Bug report or fix Gradle [ci] enable "build tools" tests Maven [ci] enable "build tools" tests labels Sep 7, 2022
Copy link
Contributor

@lkishalmi lkishalmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds fine!

@lkishalmi
Copy link
Contributor

Yes the project ID-s are not really used in NetBeans, a few Ant based projects uses that ID, but that's all.

@sdedic
Copy link
Member Author

sdedic commented Sep 7, 2022

Yes; but for certain purposes it may be important to differentiate the build system, i.e. for some abstractions that map to different actions/goals/properties/whatever in each build system. It was already in the APIs, so I've just filled the gap.
It's a pity that displayName remains unfilled - the isProject2 could be a good query for e.g. file selector.

@sdedic sdedic merged commit 8b4df5d into apache:master Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gradle [ci] enable "build tools" tests kind:bug Bug report or fix Maven [ci] enable "build tools" tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants