Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save drandarov-io/8d24cb39ff32d929197b16b542dabe0c to your computer and use it in GitHub Desktop.
Save drandarov-io/8d24cb39ff32d929197b16b542dabe0c to your computer and use it in GitHub Desktop.
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

👍 This works. Thanks.

@drandarov-io
Copy link
Author

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