-
Notifications
You must be signed in to change notification settings - Fork 30
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
Allow applying the plugin to a non-root project #359
Open
andrewaylett
wants to merge
1
commit into
gradle-nexus:master
Choose a base branch
from
andrewaylett:independent-projects
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wondering if this change alone is enough? If the user applies to non-root, then it implicitly start using the independent mode? Since it was not allowed before, it means we can define any behaviour for that case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Up to you -- I didn't want to break any of your existing tests.
Also, I'm not sure what would happen if someone tried applying the plugin to multiple projects in a build. I suspect it won't work properly; I'm pretty sure it'll open multiple staging repositories. So I wonder if needing to specify an "incubating" property is useful as an indication that the behaviour might not be entirely stable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having the plugin applied multiple times in the project might sometimes be useful for monorepos which (for some reason) would like to release particular projects to different locations in Central. However, the project author would then need to ensure that group/project/version is property set in that (sub)project and probably some other element which the plugin gets from the project.
Looking at some comments in #81:
And:
#81 (comment)
I'm a little afraid to add that switch and later on have an another set of issues related to "corner cases" 🤔
I have no experience with build_services. Do you? How hard would it be to convert the plugin to it? Would it "fix" all the (related) problems?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been pondering the question of how I'd go about turning this into a build service -- I do have some experience with them, but not of the degree of complexity that this plugin might require if we wanted to minimise surprises for existing users who upgrade.
There are some design questions that we'd need to decide on answers for. I'm not sure I have all the questions yet, let alone the answers.
If you'd be interested in seeing the result of my attempt to refactor a bit more thoroughly (with absolutely no obligation to accept any of my code, or indeed any of the design choices I might make) then I'll probably quite enjoy the diversion. I'm yak shaving for a personal project, interesting problems are if anything more what I'm looking for than actual solutions :).