In many of our projects we have the repositories block defined in both build.gradle and settings.gradle, they look like this:
build.gradle
repositories {
maven {
url { custom_nexus_repository }
}
maven {
url { custom_repository }
}
}
settings.gradle
pluginManagement {
repositories {
maven {
url "${custom_repository}"
allowInsecureProtocol = true
}
maven {
url "${custom_nexus_repository}"
allowInsecureProtocol = true
}
}
}
What's the purpose of defining it in both settings.gradle AND build.gradle? Wouldn't one or the other be sufficient?