Incompatibility with dependencyResolutionManagement setting in gradle
See original GitHub issueIt seems that loom is incompatible with dependencyResolutionManagement
. The problem is the same as the one described in this issue https://github.com/gradle/gradle/issues/15754.
To summarize, the three options in dependencyResolutionManagement
are
FAIL_ON_PROJECT_REPOS
: a repository declared in the project will trigger a build error.PREFER_PROJECT
: ignore repository declared in the settings.PREFER_SETTINGS
: ignore repository declared in the project. based on documentation https://docs.gradle.org/current/javadoc/org/gradle/api/initialization/resolve/RepositoriesMode.html
Since loom declared its repository in the plugin, it will cause FAIL_ON_PROJECT_REPOS
and PREFER_SETTINGS
not to work. However, PREFER_PROJECT
will cause the Gradle to ignore the repository declared in the settings, which can be problematic for large projects.
One solution might be to not declare a repo in the plugin, but I am not sure if it is possible.
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
Learning the Basics - Gradle User Manual
The dependencyResolutionManagement repositories block accepts the same notations as in a project, which includes Maven or Ivy repositories, with or without ...
Read more >Manage Gradle version conflicts with resolution strategy
This command will output all the dependencies for the release configuration as a tree. Can be found in Gradle window in IDE as...
Read more >Build fails using the new central repository declaration if a ...
LogicFan mentioned this issue on May 5, 2021. Incompatibility with dependencyResolutionManagement setting in gradle FabricMC/fabric-loom#395.
Read more >Gradle dependencyResolutionManagement brokes flutter ...
I tried repositoriesMode.set(RepositoriesMode.PREFER_PROJECT) and it helps me.
Read more >Frequently asked questions about version catalogs
Should I use the settings API or the TOML file? Why can't I use excludes or classifiers? How do I tell Gradle to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I really don’t know enough about it to provide any useful input right now. When I get a chance I’ll take a look.
There is a huge amount of work to get loom up to speed with the new gradle changes. I do have a future/dev branch where I have started on the easy bits.
To have compatibility with the people who choose not to use dependencyResolutionManagement, the plugin needs to have the ability to declare repos in the project. Thus, the idea is if depedencyResolutionManagement is used, the repo will be declared in the settings, and if it is not used, the repo needs to be declared in the project. These two parts of the code share a great similarity, hence it makes sense to write them in the same plugin. Thus, I would prefer a solution similar to sponge vanillagradle.