Skip to content

Instantly share code, notes, and snippets.

@xinthink
Last active November 14, 2017 13:52
Show Gist options
  • Select an option

  • Save xinthink/99c16ff2f2f707eb3b34b45e187205e1 to your computer and use it in GitHub Desktop.

Select an option

Save xinthink/99c16ff2f2f707eb3b34b45e187205e1 to your computer and use it in GitHub Desktop.
Reusable dependencies definition in Groovy
// global definition in root project
ext.versions = [
compileSdk: 26,
targetSdk: 25,
]
ext.deps = [
support: [
appCompat: “com.android.support:appcompat-v7:${versions.supportLibrary}”,
design: “com.android.support:design:${versions.supportLibrary}”,
],
picasso: ‘com.squareup.picasso:picasso:2.5.2’,
]
// access from sub-projects
dependencies {
implementation deps.support.appCompat
implementation deps.support.design
}
@xinthink
Copy link
Author

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