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

Gradle Task Names should be configurable to prevent conflicts with other plugins #234

Open
apmason13 opened this issue Feb 6, 2025 · 5 comments

Comments

@apmason13
Copy link

Currently there are tasks created by the mod dev plugin with names that are not configurable. This is fine when mod dev is the only plugin in a project, but becomes an issue when other plugins try to create tasks with the same name.

There should be a way to configure task names. The easiest solution without breaking existing Gradle scripts that depend on the current task names is by adding an optional configuration for a prefix or suffix to add to the task name. This would allow the user the option to disambiguate task names when it becomes an issue.

The main task I am running into an issue with is the "downloadAssets" task, but this would be nice to apply to all tasks.

@Technici4n
Copy link
Member

I think that making all names configurable is not great. Which plugin is there a conflict with?

@apmason13
Copy link
Author

The plugin it conflicts with is Fabric Loom. I wrote a similar issue on their repo as well.

I don't think this should be the default option, but for use cases like mine where I want to use a single subproject instead of multiple, it would be nice to have the option to add a customizable prefix or suffix to the task names. So if for example I set the custom prefix to "moddev", the "downloadAssets" task name would become "moddevDownloadAssets".

@shartte
Copy link
Collaborator

shartte commented Feb 6, 2025

We will not support custom task name prefixes

@apmason13
Copy link
Author

Can you share why this isn't something you're interested in supporting?

Also, since you won't be supporting a method for disambiguating task names, would you be open to renaming the "downloadAssets" task to allow mod dev and loom to be applied to the same project? This doesn't seem like an unreasonable way to setup a project, especially since mod dev has such great support for customizing the source set of a mod.

My end goal is to separate neoforge and fabric into individual source sets under the same project.

@Technici4n
Copy link
Member

Gradle plugins don't usually let you rename tasks.

Besides, we already don't support MDG in NeoForge mode and MDG in Vanilla mode in the same project, by design. So we have no reason to support MDG and Loom in the same project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants