Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
D.R.Y. - Reuse Gradle repository definition
This works however:
#### build.gradle
```gradle
buildscript {
// Repository Configuration
ext.repos = {
mavenCentral()
maven { url 'https://repo.spring.io/milestone' }
maven { url 'https://plugins.gradle.org/m2/' }
}
repositories repos
dependencies {
. . .
}
}
// Local
repositories repos
// Global
allprojects {
repositories repos
}
```
@andresventura
Copy link

andresventura commented Oct 30, 2017

👍 This works. Thanks.

@drandarov-io
Copy link
Author

drandarov-io commented Dec 4, 2017

You're welcome :)

@gxshao
Copy link

gxshao commented Apr 11, 2019

Your solution is wonderful~~brilliant~ thanks a lot

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