Slackbot
01/22/2024, 8:47 PMCaleb Cushing
01/22/2024, 9:16 PMrepositories {
mavenCentral()
}
spotless {...Fuyang Liu
01/22/2024, 9:20 PMFuyang Liu
01/22/2024, 9:24 PM"com.diffplug.spotless:spotless-plugin-gradle:6.+" might need to be "com.diffplug.spotless:spotless-plugin-gradle.gradle.plugin:6.+" ?
But I could be totally wrong…. 🙂 Ignore me if so 🙂ephemient
01/22/2024, 9:52 PMephemient
01/22/2024, 9:53 PMephemient
01/22/2024, 9:53 PMdependencyResolutionManagement can help, as long as no plugins or subproject break conventions and start mucking around with repositories on their ownCaleb Cushing
01/22/2024, 10:05 PMdependencyResolutionManagment that did nothingephemient
01/22/2024, 10:06 PMephemient
01/22/2024, 10:07 PMCaleb Cushing
01/22/2024, 10:07 PMephemient
01/22/2024, 10:08 PMmavenCentral() or equivalent repository in their documentation, they shouldCaleb Cushing
01/22/2024, 10:08 PMCaleb Cushing
01/22/2024, 10:09 PMephemient
01/22/2024, 10:09 PMCaleb Cushing
01/22/2024, 10:09 PMerrorProne which has the option to do a similar thingCaleb Cushing
01/22/2024, 10:10 PMdependencies { }Caleb Cushing
01/22/2024, 10:10 PMCaleb Cushing
01/22/2024, 10:11 PMAdam
01/23/2024, 8:36 AMpluginManagement {
repositories {
mavenCentral()
gradlePluginPortal()
}
}
@Suppress("UnstableApiUsage")
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
mavenCentral()
gradlePluginPortal() // this should only be necessary in buildSrc/settings.gradle.kts
}
}
The strict repositoriesMode should trigger an error for any plugins that are adding repositories. These can be hard to track down, but at least you'll be able to see what plugins are causing issues.