-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdependencies.gradle
81 lines (80 loc) · 4.06 KB
/
dependencies.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
final def daggerVersion = "2.25.2"
final def espressoVersion = "3.2.0"
final def testRunnerVersion = "1.2.0"
final def testRulesVersion = "1.2.0"
final def jsr250Version = "1.0"
final def jUnitVersion = "4.12"
final def kotlinVersion = rootProject.ext.kotlinVersion
final def mockkVersion = "1.9.3"
final def picassoVersion = "2.71828"
final def retrofitVersion = "2.7.0"
final def rxAndroidVersion = "2.1.1"
final def rxJavaVersion = "2.2.16"
// Store is a reactive cache management framework available at https://github.com/nytimes/Store
// I wrote their Kotlin DSL artifacts so I thought I might as well show off a bit!
final def storeVersion = "3.1.1"
final def materialVersion = "1.0.0"
// test-accessors are a couple of annotation processors I wrote that generate code to access
// fields from tests that would be otherwise inaccessible by generating code that can only be used
// from the tests. Think of it as a safer version of @VisibleForTesting. Check it out
// at https://github.com/stoyicker/test-accessors
// These are used to access a couple of fields from tests as well as to alter DI to use test-specific
// components. Regarding this point in particular, in a more traditional project you may have seen the
// application class be used as a DI root for the entire app and then in instrumented tests replace
// the runner with one which invokes a test-specific application instance that replaces production
// components with the desired replacements for testing. This approach is not appropriate for this
// project as it would require that every module leaks the boundary of its dependency graph to
// to _app, where the application class lives, killing one of the pros of this approach: feature
// independence. To avoid this, instead of using the application as DI root in the tests, each
// module has its own DI root(s) which, in spite of being children to the component in the application
// class, are setup so that in the tests they can be replaced at a per-Android component-level.
// This allows for maximum flexibility when writing tests,
final def testAccessorsVersions = "1.2.2"
final def moshiVersion = "1.9.2"
final def rxJavaExtensionsVersion = "0.20.10"
final def findbugsVersion = "3.0.2"
ext {
implementationDependencies = [
"org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion",
"com.github.stoyicker.test-accessors:annotations:$testAccessorsVersions",
"com.google.android.material:material:$materialVersion",
"com.squareup.picasso:picasso:$picassoVersion",
"io.reactivex.rxjava2:rxjava:$rxJavaVersion",
"com.github.akarnokd:rxjava2-extensions:$rxJavaExtensionsVersion",
"io.reactivex.rxjava2:rxandroid:$rxAndroidVersion",
"com.google.dagger:dagger:$daggerVersion",
"com.nytimes.android:store3:$storeVersion",
"com.nytimes.android:store-kotlin3:$storeVersion",
"com.nytimes.android:middleware-moshi3:$storeVersion",
"com.nytimes.android:filesystem3:$storeVersion",
"com.squareup.moshi:moshi-kotlin-codegen:$moshiVersion",
"com.squareup.retrofit2:retrofit:$retrofitVersion",
"com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion",
"com.squareup.retrofit2:converter-moshi:$retrofitVersion",
"com.google.code.findbugs:jsr305:$findbugsVersion"
]
testImplementationDependencies = [
"junit:junit:$jUnitVersion",
"io.mockk:mockk:$mockkVersion"
]
kaptDependencies = [
"com.github.stoyicker.test-accessors:processor-kotlin:$testAccessorsVersions"
]
androidTestImplementationDependencies = [
"androidx.test.espresso:espresso-core:$espressoVersion",
"androidx.test:runner:$testRunnerVersion",
"androidx.test:rules:$testRulesVersion",
"io.mockk:mockk-android:$mockkVersion"
]
compileOnlyDependencies = [
"javax.annotation:jsr250-api:$jsr250Version"
]
kaptListDependencies = [
"com.google.dagger:dagger-compiler:$daggerVersion",
"com.google.dagger:dagger-compiler:$daggerVersion",
"com.squareup.moshi:moshi-kotlin-codegen:$moshiVersion"
]
kaptAndroidTestListDependencies = [
"com.google.dagger:dagger-compiler:$daggerVersion"
]
}