Skip to content

Instantly share code, notes, and snippets.

@jitpack-io
Last active March 18, 2023 13:38
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jitpack-io/462aaec94995a3682b8be28b8c1a7ef2 to your computer and use it in GitHub Desktop.
Save jitpack-io/462aaec94995a3682b8be28b8c1a7ef2 to your computer and use it in GitHub Desktop.
init.gradle script to print Maven repositories. Copy to ~/.gradle/
# copy script to ~/.gradle/init.gradle
gradle.projectsEvaluated {
allprojects { project ->
task printRepos() {
println("Project repositories: ${project.name}")
repositories {
all { ArtifactRepository repo ->
if (repo instanceof MavenArtifactRepository) {
println("Maven Repo: ${repo.url} - ${repo.credentials} in project ${project.name}")
}
}
println()
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment