-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
make name for Eclipse resource filters configurable #1974
Comments
Also related, existing |
Could you please elaborate what you mean by "newly introduced Eclipse resource filter DSL for eclipse"? |
This might be due to my misunderstanding of the resource filter API. I had assumed that "name" is a human-readable name for the filter, but found out that Eclipse would just throw exceptions whenever I give it a value. Thanks for clarifying that. Would you be interested in fixing this with a PR? |
@oehme I guess if it would be just the DSL for the name, I would have done it, not sure about the merging and filling in beforeMerged and whenMerged. The main problem is, that I have a workaround. I did create this configuration even before this DSL. I mainly create PRs for stuff that really bugs me and for which I don't have a workaround, or that are easy to fix. :-) |
There seems to be a workaround, because
Leads to the following filter properly only removing
The important thing to note is that My project contains code in a package using "[...].build.[...]" and without |
@ams-tschoening I'm not fully sure, but I thought I tried using |
I don't have the same dir structure, but in the following example I can exclude everything in
|
This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution. |
This issue has been automatically closed due to inactivity. If you can reproduce this on a recent version of Gradle or if you have a good use case for this feature, please feel free to reopen the issue with steps to reproduce, a quick explanation of your use case or a high-quality pull request. |
With the newly introduced Eclipse resource filter DSL for eclipse, you can now configure resource filters for the generated project file. But the name tag is intentionally left blank always. This makes the feature useless for certain usecases. If you e. g. want to exclude everything in
build
except ofbuild/classes/eclipse
, you need a resource filter on thebuild
directory that non-recursivelyINCLUDEs_ONLY
FILES_AND_FOLDERS
with1.0-name-matches-true-false-classes
and a second resource filter on thebuild/classes
directory that non-recursivelyINCLUDEs_ONLY
FILES_AND_FOLDERS
with1.0-name-matches-true-false-eclipse
. The directory on which the resource filter is effective is configured by the name of the resource filter. So the config to be generated isThis is currently not possible as there is no setting for the name and the code says
filterNode.appendNode("name"); // always empty
.You can reproduce the wanted behavior with Eclipse by selecting the
build
directory and pressing Alt+Enter, then add theclasses
resource filter, then selecting theclasses
directory and pressing Alt+Enter, then add theeclipse
resource filter.The text was updated successfully, but these errors were encountered: