Open radstevee opened 1 month ago
userdev adds repos to Projects to implement it's functionality. So this is expected behavior with the default repositories mode and central declaration: https://docs.gradle.org/current/userguide/centralizing_repositories.html#sec:repositories-mode.
In the future I'd like to implement a settings plugin that can add the repos centrally for compatibility with PREFER_SETTINGS
and FAIL_ON_PROJECT_REPOS
, and better flexibility with PREFER_PROJECT
. But this would require a non-trivial rework.
The current technique to work with PREFER_PROJECT
would be creating a custom plugin (with an included build or buildSrc) that adds your repos and is applicable to Settings or Project instances. Then you would apply the plugin in settings and your userdev projects. You would probably also want to disable injecting the Paper repo on the paperweight extension if you declare Paper in your central repo list.
This way projects without repos defined will use the settings repos, and userdev projects will use the project repos, which will now contain the common/central repos in addition to the userdev ones.
When applying userdev to a project with a
dependencyResolutionManagement { repositories { ... } }
block, these will be discarded and only maven central and the paper repo will be added. MRE: https://github.com/radstevee/paperweight-288-mre