Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save VacantThinker/1293609aeb0a405ffb838bc86491cef1 to your computer and use it in GitHub Desktop.

Select an option

Save VacantThinker/1293609aeb0a405ffb838bc86491cef1 to your computer and use it in GitHub Desktop.
gradle add default repository for all projects

link

https://riptutorial.com/gradle/example/14830/add-default-repository-for-all-projects


location

C:\Users\username\.gradle

filename

init.gradle

file

allprojects {
    repositories {
		    maven { url 'https://maven.aliyun.com/repository/central' }
        maven { url 'https://maven.aliyun.com/repository/public' }
        maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
        maven { url 'https://maven.aliyun.com/repository/apache-snapshots' }

        mavenLocal()

		    mavenCentral()
        google()
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment