forked from coolfire2015/RxFluxArchitecture
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdepend_common.gradle
145 lines (139 loc) · 5.82 KB
/
depend_common.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
//Common模块和业务模块通用依赖
android {
//编译版本
compileSdkVersion COMPILE_SDK_VERSION as int
//lint设置
lintOptions {
//lint 不被终止
abortOnError false
//打Release版本时,不进行检测
checkReleaseBuilds false
//关闭检索的功能
disable 'GoogleAppIndexingWarning'
}
//数据绑定
dataBinding {
enabled = true
}
//Dex分包
dexOptions {
jumboMode = true
javaMaxHeapSize "4g"//增加java堆内存大小
}
//Java1.8支持
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
//单元测试,Robolectric支持
testOptions {
unitTests {
includeAndroidResources = true
}
}
}
//将源代码打包进aar
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.javaDirectories
}
artifacts {
archives sourcesJar
}
//仓库
repositories {
//本地仓库,添加aar支持
flatDir { dirs 'libs' }
}
//通用的依赖库
dependencies {
//内核
implementation project(':core-arch')
// implementation "com.github.coolfire2015.RxFluxArchitecture:core-arch:${RX_FLUX_ARCHITECTURE}"
implementation "com.github.coolfire2015:RxFluxUtils:${RX_FLUX_UTILS}"
implementation "com.github.coolfire2015:RxFluxImage:${RX_FLUX_IMAGE}"
//X-Core
implementation "androidx.core:core-ktx:${X_CORE}"
//X-Fragment
implementation "androidx.fragment:fragment-ktx:${X_FRAGMENT}"
//X-Lifecycle
implementation "androidx.lifecycle:lifecycle-livedata-ktx:${X_LIFECYCLE}"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:${X_LIFECYCLE}"
//X-Navigation
implementation "androidx.navigation:navigation-ui-ktx:${X_NAVIGATION}"
implementation "androidx.navigation:navigation-fragment-ktx:${X_NAVIGATION}"
//X-Room
implementation "androidx.room:room-runtime:${X_ROOM}"
implementation "androidx.room:room-ktx:${X_ROOM}"
implementation "androidx.room:room-rxjava2:${X_ROOM}"
//X_Paging
implementation "androidx.paging:paging-runtime-ktx:${X_PAGING}"
implementation "androidx.paging:paging-rxjava2-ktx:${X_PAGING}"
//X-WorkManager
implementation "androidx.work:work-runtime-ktx:${X_WORK}"
//X-MultiDex
implementation "androidx.multidex:multidex:${X_MULTIDEX}"
//X-CardView
implementation "androidx.cardview:cardview:${X_CARD_VIEW}"
//X-RecyclerView
implementation "androidx.recyclerview:recyclerview:${X_RECYCLE_RVIEW}"
//X-Material
implementation "com.google.android.material:material:${X_MATERIAL}"
//X_ConstraintLayout
implementation "androidx.constraintlayout:constraintlayout:${X_CONSTRAINT}"
//Kotlin支持
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${KOTLIN_VERSION}"
//Kotlin Coroutines 支持
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:${KOTLIN_COROUTINES}"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:${KOTLIN_COROUTINES}"
//OkHttp
implementation "com.squareup.okhttp3:okhttp:${OKHTTP}"
implementation "com.squareup.okhttp3:logging-interceptor:${OKHTTP}"
//Retrofit
implementation "com.squareup.retrofit2:retrofit:${RETROFIT}"
implementation "com.squareup.retrofit2:converter-gson:${RETROFIT}"
implementation "com.squareup.retrofit2:adapter-rxjava2:${RETROFIT}"
//Json
implementation "com.google.code.gson:gson:${GSON}"
//Mmkv
implementation "com.tencent:mmkv:${MMKV}"
//ARouter
implementation "com.alibaba:arouter-api:${AROUTER_API}"
//AutoDispose
implementation "com.uber.autodispose:autodispose-android-archcomponents:${AUTO_DISPOSE}"
//Anko Commons
implementation "org.jetbrains.anko:anko-commons:$ANKO"
//SmartRefreshLayout
implementation "com.scwang.smartrefresh:SmartRefreshLayout:${SMART_REFRESH_LAYOUT}"
//RecyclerView适配器
implementation "com.github.CymChad:BaseRecyclerViewAdapterHelper:${BASE_RECYCLERVIEW_ADAPTER_HELPER}"
//日志展示
implementation "com.orhanobut:logger:${ORHANOBUT_LOGGER}"
//LeakCanary
debugImplementation "com.squareup.leakcanary:leakcanary-android:${LEAK_CANARY}"
//测试Android
testImplementation "androidx.test:runner:${TEST_X_RUNNER}"
testImplementation "androidx.test.ext:junit:${TEST_X_JUNIT}"
testImplementation "androidx.test.espresso:espresso-core:${TEST_X_ESPRESSO}"
testImplementation "androidx.test:core:${TEST_X_CORE}"
testImplementation "androidx.test:rules:${TEST_X_RULES}"
testImplementation "androidx.fragment:fragment-testing:${X_FRAGMENT}"
//单元测试
testImplementation "junit:junit:${TEST_JUNIT}"
testImplementation "org.mockito:mockito-core:${TEST_MOCKITO}"
testImplementation "org.robolectric:robolectric:${TEST_ROBOLECTRIC}"
testImplementation "com.github.fabioCollini.daggermock:daggermock:${TEST_DEAAGE_MOCK}"
testImplementation "com.github.fabioCollini.daggermock:daggermock-kotlin:${TEST_DEAAGE_MOCK}"
//测试Api
testImplementation "com.squareup.okhttp3:okhttp-tls:${OKHTTP}"
testImplementation "com.squareup.okhttp3:mockwebserver:${OKHTTP}"
testImplementation "com.github.andrzejchm.RESTMock:android:${TEST_REST_MOCK}"
//测试工具
testImplementation "org.assertj:assertj-core:${TEST_ASSERT_J}"
testImplementation "com.squareup.assertj:assertj-android:${TEST_ASSERT_J_ANDROID}"
testImplementation "org.powermock:powermock-api-mockito2:${TEST_POWER_MOCK}"
testImplementation "org.powermock:powermock-module-junit4:${TEST_POWER_MOCK}"
testImplementation "org.powermock:powermock-module-junit4-rule:${TEST_POWER_MOCK}"
testImplementation "org.powermock:powermock-classloading-xstream:${TEST_POWER_MOCK}"
testImplementation "com.github.coolfire2015:RxFluxTestUtils:${RX_FLUX_TEST_UTILS}"
}