Last active
November 14, 2017 13:52
-
-
Save xinthink/99c16ff2f2f707eb3b34b45e187205e1 to your computer and use it in GitHub Desktop.
Reusable dependencies definition in Groovy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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’, | |
| … | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // access from sub-projects | |
| dependencies { | |
| implementation deps.support.appCompat | |
| implementation deps.support.design | |
| … | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For article: Defining Dependencies in Gradle Kotlin DS