Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

将每个 Module 的依赖库都整理到 dependencies.gradle 里 #4

Merged
merged 1 commit into from Feb 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 6 additions & 13 deletions app/build.gradle
Expand Up @@ -56,22 +56,15 @@ android {
}

dependencies {
def dependencies = rootProject.ext.dependencies

implementation project(':domain')
implementation project(':data')

annotationProcessor dependencies.daggerCompiler
implementation dependencies.dagger
implementation dependencies.butterKnife
implementation dependencies.recyclerView
implementation dependencies.rxJava
implementation dependencies.rxAndroid
annotationProcessor dependencies.butterKnifeCompiler
implementation dependencies.arrow

//Development
implementation dependencies.leakCanary
rootProject.ext.app_dependencies.each {
item -> implementation item
}
rootProject.ext.app_annotation_dependencies.each {
item -> annotationProcessor item
}
}

repositories {
Expand Down
15 changes: 7 additions & 8 deletions data/build.gradle
Expand Up @@ -43,15 +43,14 @@ android {
}

dependencies {
def dependencies = rootProject.ext.dependencies

implementation project(':domain')
implementation dependencies.javaxInject
implementation dependencies.okHttp
implementation dependencies.gson
implementation dependencies.rxJava
implementation dependencies.rxAndroid
implementation dependencies.androidAnnotations

rootProject.ext.data_dependencies.each {
item -> implementation item
}
rootProject.ext.data_annotation_dependencies.each {
item -> annotationProcessor item
}
}

repositories {
Expand Down
33 changes: 33 additions & 0 deletions dependencies.gradle
Expand Up @@ -41,4 +41,37 @@ ext {
androidAnnotations : "com.android.support:support-annotations:${androidAnnotationsVersion}",
leakCanary : "com.squareup.leakcanary:leakcanary-android:${leakCanaryVersion}",
]

app_dependencies = [
dependencies.dagger,
dependencies.butterKnife,
dependencies.recyclerView,
dependencies.rxJava,
dependencies.rxAndroid,
dependencies.arrow,
dependencies.leakCanary
]
app_annotation_dependencies = [
dependencies.daggerCompiler,
dependencies.butterKnifeCompiler
]

data_dependencies = [
dependencies.javaxInject,
dependencies.okHttp,
dependencies.gson,
dependencies.rxJava,
dependencies.rxAndroid,
dependencies.androidAnnotations,
]
data_annotation_dependencies = [
]

domain_dependencies = [
dependencies.javaxInject,
dependencies.rxJava,
dependencies.arrow,
]
domain_annotation_dependencies = [
]
}
11 changes: 6 additions & 5 deletions domain/build.gradle
Expand Up @@ -21,9 +21,10 @@ android {
}

dependencies {
def dependencies = rootProject.ext.dependencies

implementation dependencies.javaxInject
implementation dependencies.rxJava
implementation dependencies.arrow
rootProject.ext.domain_dependencies.each {
item -> implementation item
}
rootProject.ext.domain_annotation_dependencies.each {
item -> annotationProcessor item
}
}