ben-manes / gradle-versions-plugin

Gradle plugin to discover dependency updates
Apache License 2.0
3.82k stars 199 forks source link

Possible to restrict what maven repositories are used? #806

Closed rcolombo closed 10 months ago

rcolombo commented 10 months ago

I only want this plugin to scan https://repo1.maven.org/maven2/. Is this possible?

ben-manes commented 10 months ago

sure, just remove all the other repositories in a doFirst action, e.g.

tasks.dependencyUpdates.doFirst {
  repositories.clear()
  repositories {
    mavenCentral()
  }
}

Alternatively, you might use repository content filtering to avoid scanning the wrong repositories if you are trying to speed up the queries.

rcolombo commented 10 months ago

Thank you!