Yahav Itzhak
02/26/2024, 4:15 PMbuild.gradle file.
Here’s a simple example illustrating what the plugin accomplishes:
public class MyPluginSettings implements Plugin<Settings> {
@Override
public void apply(Settings settings) {
settings.getDependencyResolutionManagement().getRepositoriesMode().set(RepositoriesMode.PREFER_SETTINGS);
settings.getDependencyResolutionManagement().getRepositories().maven(mavenArtifactRepository -> {
mavenArtifactRepository.setUrl(repoUrl);
});
}
}
Is there a way to use the repositories from the settings phase while still falling back to the ones specified in build.gradle?
In other words, I’d like to use PREFER_SETTINGS with a fallback to PREFER_PROJECT.
How can I achieve that?
Thanks in advance.Vampire
02/26/2024, 4:30 PMVampire
02/26/2024, 4:31 PMVampire
02/26/2024, 4:31 PMVampire
02/26/2024, 4:32 PM