Created
November 30, 2017 16:03
-
-
Save alexfu/688df5ab34d1f27580064729e33bf60b to your computer and use it in GitHub Desktop.
Grouping shared dependencies
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
/** | |
* This file would be located under /path/to/project/app/build.gradle | |
*/ | |
apply plugin: 'com.android.application' | |
android { | |
// Usual stuff | |
} | |
apply from: "$project.rootDir/shared_dependencies.gradle" | |
dependencies { | |
implementation 'com.android.support:appcompat-v7:26.1.0' | |
implementation 'com.android.support.constraint:constraint-layout:1.0.2' | |
sharedDependencies.network() | |
} |
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
/** | |
* This file would be located under /path/to/project/mylib/build.gradle | |
*/ | |
apply plugin: 'com.android.library' | |
android { | |
// Usual stuff | |
} | |
apply from: "$project.rootDir/shared_dependencies.gradle" | |
dependencies { | |
implementation 'com.android.support:appcompat-v7:26.1.0' | |
sharedDependencies.network() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment