question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incompatibility with dependencyResolutionManagement setting in gradle

See original GitHub issue

It 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

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:closed
  • Created 2 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
modmuss50commented, May 11, 2021

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.

1reaction
LogicFancommented, May 11, 2021

I suggest shipping an additional plugin that sets the repositories for the settings than making the same plugin work for both environments like sponge does. having the same plugin target two different things is quite confusing.

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found