Skip to content

Commit 1ae460d

Browse files
committed
Fix gradle setup
1 parent f036554 commit 1ae460d

File tree

7 files changed

+116
-77
lines changed

7 files changed

+116
-77
lines changed

data/build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ dependencies {
1111

1212
compile dataDependencies.javaxAnnotation
1313

14-
compile dataDependencies.kotlin
15-
compile dataDependencies.javaxInject
16-
compile dataDependencies.rxKotlin
14+
implementation dataDependencies.kotlin
15+
implementation dataDependencies.javaxInject
16+
implementation dataDependencies.rxKotlin
1717

18-
testCompile dataTestDependencies.junit
19-
testCompile dataTestDependencies.kotlinJUnit
20-
testCompile dataTestDependencies.mockito
21-
testCompile dataTestDependencies.assertj
18+
testImplementation dataTestDependencies.junit
19+
testImplementation dataTestDependencies.kotlinJUnit
20+
testImplementation dataTestDependencies.mockito
21+
testImplementation dataTestDependencies.assertj
2222
}

dependencies.gradle

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,24 @@ ext {
2929
roomVersion = '1.0.0-alpha6'
3030
supportLibraryVersion = '25.4.0'
3131
timberVersion = '4.5.1'
32+
rxAndroidVersion = '2.0.1'
33+
glideVersion = '4.0.0'
34+
daggerVersion = '2.11'
35+
glassfishAnnotationVersion = '10.0-b28'
3236

3337
//Testing
3438
robolectricVersion = '3.4'
3539
jUnitVersion = '4.12'
3640
assertJVersion = '1.7.1'
3741
mockitoVersion = '1.9.5'
3842
dexmakerVersion = '1.0'
39-
espressoVersion = '2.0'
43+
espressoVersion = '2.2.2'
4044
testingSupportLibVersion = '0.1'
4145
mockitoKotlinVersion = '1.5.0'
4246
androidSupportRunnerVersion = '0.5'
4347
androidSupportRulesVersion = '0.5'
48+
dexmakerMockitoversion = '2.2.0'
49+
runnerVersion = '0.5'
4450

4551
domainDependencies = [
4652
javaxAnnotation: "javax.annotation:jsr250-api:${javaxAnnotationVersion}",
@@ -160,6 +166,8 @@ ext {
160166
daggerCompiler: "com.google.dagger:dagger-compiler:${daggerVersion}",
161167
dagger: "com.google.dagger:dagger:${daggerVersion}",
162168
rxKotlin: "io.reactivex.rxjava2:rxkotlin:${rxKotlinVersion}",
169+
rxAndroid: "io.reactivex.rxjava2:rxandroid:${rxAndroidVersion}",
170+
glide: "com.github.bumptech.glide:glide:${glideVersion}",
163171
kotlin: "org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}",
164172
javaxAnnotation: "javax.annotation:jsr250-api:${javaxAnnotationVersion}",
165173
javaxInject: "javax.inject:javax.inject:${javaxInjectVersion}",
@@ -169,7 +177,10 @@ ext {
169177
appCompatV7: "com.android.support:appcompat-v7:${supportLibraryVersion}",
170178
supportRecyclerView:"com.android.support:recyclerview-v7:${supportLibraryVersion}",
171179
supportDesign: "com.android.support:design:${supportLibraryVersion}",
172-
timber: "com.jakewharton.timber:timber:${timberVersion}"
180+
timber: "com.jakewharton.timber:timber:${timberVersion}",
181+
daggerSupport: "com.google.dagger:dagger-android-support:${daggerVersion}",
182+
daggerProcessor: "com.google.dagger:dagger-android-processor:${daggerVersion}",
183+
glassfishAnnotation: "org.glassfish:javax.annotation:${glassfishAnnotationVersion}"
173184
]
174185

175186
mobileUiTestDependencies = [
@@ -178,7 +189,13 @@ ext {
178189
assertj: "org.assertj:assertj-core:${assertJVersion}",
179190
mockito: "com.nhaarman:mockito-kotlin:${mockitoKotlinVersion}",
180191
supportRunner: "com.android.support.test:runner:${androidSupportRunnerVersion}",
181-
supportRules: "com.android.support.test:rules:${androidSupportRulesVersion}"
192+
supportRules: "com.android.support.test:rules:${androidSupportRulesVersion}",
193+
dexmakerMockito: "com.linkedin.dexmaker:dexmaker-mockito:${dexmakerMockitoversion}",
194+
espressoCore: "com.android.support.test.espresso:espresso-core:${espressoVersion}",
195+
espressoIntents: "com.android.support.test.espresso:espresso-intents:${espressoVersion}",
196+
espressoContrib: "com.android.support.test.espresso:espresso-contrib:${espressoVersion}",
197+
androidRunner: "com.android.support.test:runner:${runnerVersion}",
198+
androidRules: "com.android.support.test:rules:${runnerVersion}"
182199
]
183200

184201
}

domain/build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ dependencies {
1313
def domainDependencies = rootProject.ext.domainDependencies
1414
def domainTestDependencies = rootProject.ext.domainTestDependencies
1515

16-
compile domainDependencies.javaxAnnotation
17-
compile domainDependencies.javaxInject
18-
compile domainDependencies.rxKotlin
19-
compile domainDependencies.kotlin
16+
implementation domainDependencies.javaxAnnotation
17+
implementation domainDependencies.javaxInject
18+
implementation domainDependencies.rxKotlin
19+
implementation domainDependencies.kotlin
2020

21-
testCompile domainTestDependencies.junit
22-
testCompile domainTestDependencies.mockito
23-
testCompile domainTestDependencies.assertj
21+
testImplementation domainTestDependencies.junit
22+
testImplementation domainTestDependencies.mockito
23+
testImplementation domainTestDependencies.assertj
2424

2525
}

mobile-ui/build.gradle

Lines changed: 38 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ android {
1616
testInstrumentationRunner "org.buffer.android.boilerplate.ui.test.TestRunner"
1717
}
1818

19+
buildTypes {
20+
debug {
21+
testCoverageEnabled true
22+
}
23+
}
24+
1925
dexOptions {
2026
preDexLibraries = false
2127
dexInProcess = false
@@ -55,10 +61,6 @@ configurations.all {
5561
}
5662

5763
dependencies {
58-
59-
final ESPRESSO_VERSION = '2.2.2'
60-
final RUNNER_VERSION = '0.5'
61-
6264
def mobileUiDependencies = rootProject.ext.mobileUiDependencies
6365
def mobileUiTestDependencies = rootProject.ext.mobileUiTestDependencies
6466

@@ -67,38 +69,46 @@ dependencies {
6769
compile project(':cache')
6870
compile project(':remote')
6971

70-
compile mobileUiDependencies.javaxAnnotation
71-
72-
compile mobileUiDependencies.kotlin
73-
compile mobileUiDependencies.javaxInject
74-
compile mobileUiDependencies.rxKotlin
75-
compile mobileUiDependencies.androidAnnotations
76-
compile mobileUiDependencies.androidSupportV4
77-
compile mobileUiDependencies.androidSupportV13
78-
compile mobileUiDependencies.appCompatV7
79-
compile mobileUiDependencies.supportRecyclerView
80-
compile mobileUiDependencies.supportDesign
81-
compile mobileUiDependencies.timber
82-
83-
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
84-
compile 'com.github.bumptech.glide:glide:4.0.0'
72+
implementation mobileUiDependencies.javaxAnnotation
73+
74+
implementation mobileUiDependencies.kotlin
75+
implementation mobileUiDependencies.javaxInject
76+
implementation mobileUiDependencies.rxKotlin
77+
implementation mobileUiDependencies.androidAnnotations
78+
implementation mobileUiDependencies.androidSupportV4
79+
implementation mobileUiDependencies.androidSupportV13
80+
implementation mobileUiDependencies.appCompatV7
81+
implementation mobileUiDependencies.supportRecyclerView
82+
implementation mobileUiDependencies.supportDesign
83+
implementation mobileUiDependencies.timber
84+
implementation mobileUiDependencies.rxAndroid
85+
implementation mobileUiDependencies.glide
86+
implementation mobileUiDependencies.dagger
87+
implementation mobileUiDependencies.daggerSupport
88+
89+
testImplementation mobileUiTestDependencies.kotlinJUnit
90+
91+
kapt mobileUiDependencies.daggerCompiler
92+
kapt mobileUiDependencies.daggerProcessor
93+
provided mobileUiDependencies.glassfishAnnotation
8594

8695
// Instrumentation test dependencies
87-
androidTestCompile mobileUiTestDependencies.junit
88-
androidTestCompile mobileUiTestDependencies.mockito
89-
androidTestCompile ("com.android.support.test.espresso:espresso-core:$ESPRESSO_VERSION") {
96+
androidTestImplementation mobileUiTestDependencies.junit
97+
androidTestImplementation mobileUiTestDependencies.mockito
98+
androidTestImplementation mobileUiTestDependencies.dexmakerMockito
99+
androidTestImplementation (mobileUiTestDependencies.espressoCore) {
90100
exclude group: 'com.android.support', module: 'support-annotations'
91101
}
92-
androidTestCompile ("com.android.support.test:runner:$RUNNER_VERSION") {
102+
androidTestImplementation (mobileUiTestDependencies.androidRunner) {
93103
exclude group: 'com.android.support', module: 'support-annotations'
94104
}
95-
androidTestCompile ("com.android.support.test:rules:$RUNNER_VERSION") {
105+
androidTestImplementation (mobileUiTestDependencies.androidRules) {
96106
exclude group: 'com.android.support', module: 'support-annotations'
97107
}
98-
androidTestCompile ("com.android.support.test.espresso:espresso-intents:$ESPRESSO_VERSION") {
108+
androidTestImplementation (mobileUiTestDependencies.espressoIntents) {
99109
exclude group: 'com.android.support', module: 'support-annotations'
100110
}
101-
androidTestCompile("com.android.support.test.espresso:espresso-contrib:$ESPRESSO_VERSION") {
111+
androidTestImplementation(mobileUiTestDependencies.espressoContrib) {
102112
exclude module: 'appcompat'
103113
exclude module: 'appcompat-v7'
104114
exclude module: 'support-v4'
@@ -107,18 +117,7 @@ dependencies {
107117
exclude module: 'recyclerview-v7'
108118
exclude module: 'design'
109119
}
110-
androidTestCompile 'com.linkedin.dexmaker:dexmaker-mockito:2.2.0'
111-
final DAGGER_VERSION = '2.11'
112-
113-
def daggerCompiler = "com.google.dagger:dagger-compiler:$DAGGER_VERSION"
114-
115-
compile "com.google.dagger:dagger:$DAGGER_VERSION"
116-
compile "com.google.dagger:dagger-android-support:$DAGGER_VERSION"
117-
118-
kapt daggerCompiler
119-
kapt "com.google.dagger:dagger-android-processor:$DAGGER_VERSION"
120-
provided 'org.glassfish:javax.annotation:10.0-b28'
121120

122-
kaptTest daggerCompiler
123-
kaptAndroidTest daggerCompiler
121+
kaptTest mobileUiDependencies.daggerCompiler
122+
kaptAndroidTest mobileUiDependencies.daggerCompiler
124123
}

presentation/build.gradle

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ dependencies {
1515

1616
compile presentationDependencies.javaxAnnotation
1717

18-
compile presentationDependencies.kotlin
19-
compile presentationDependencies.javaxInject
20-
compile presentationDependencies.rxKotlin
21-
testCompile presentationTestDependencies.junit
22-
testCompile presentationTestDependencies.mockito
23-
testCompile presentationTestDependencies.assertj
24-
testCompile presentationTestDependencies.robolectric
18+
implementation presentationDependencies.kotlin
19+
implementation presentationDependencies.javaxInject
20+
implementation presentationDependencies.rxKotlin
21+
22+
testImplementation presentationTestDependencies.junit
23+
testImplementation presentationTestDependencies.mockito
24+
testImplementation presentationTestDependencies.assertj
25+
testImplementation presentationTestDependencies.robolectric
2526

2627
compile project(':domain')
2728
}

remote/build.gradle

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@ dependencies {
77
def remoteDependencies = rootProject.ext.remoteDependencies
88
def remoteTestDependencies = rootProject.ext.remoteTestDependencies
99

10-
compile remoteDependencies.javaxAnnotation
10+
implementation remoteDependencies.javaxAnnotation
1111

12-
compile remoteDependencies.kotlin
13-
compile remoteDependencies.javaxInject
14-
compile remoteDependencies.rxKotlin
15-
compile remoteDependencies.gson
16-
compile remoteDependencies.okHttp
17-
compile remoteDependencies.okHttpLogger
18-
compile remoteDependencies.retrofit
19-
compile remoteDependencies.retrofitConverter
20-
compile remoteDependencies.retrofitAdapter
12+
implementation remoteDependencies.kotlin
13+
implementation remoteDependencies.javaxInject
14+
implementation remoteDependencies.rxKotlin
15+
implementation remoteDependencies.gson
16+
implementation remoteDependencies.okHttp
17+
implementation remoteDependencies.okHttpLogger
18+
implementation remoteDependencies.retrofit
19+
implementation remoteDependencies.retrofitConverter
20+
implementation remoteDependencies.retrofitAdapter
2121

22-
testCompile remoteTestDependencies.junit
23-
testCompile remoteTestDependencies.kotlinJUnit
24-
testCompile remoteTestDependencies.mockito
25-
testCompile remoteTestDependencies.assertj
22+
testImplementation remoteTestDependencies.junit
23+
testImplementation remoteTestDependencies.kotlinJUnit
24+
testImplementation remoteTestDependencies.mockito
25+
testImplementation remoteTestDependencies.assertj
2626

2727
compile project(':data')
2828
}

travis.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
language: android
2+
env:
3+
global:
4+
- ANDROID_TARGET=android-26
5+
- ANDROID_ABI=armeabi-v7a
6+
android:
7+
components:
8+
- tools
9+
- platform-tools
10+
- build-tools-26.0.0
11+
- android-26
12+
- extra-android-m2repository
13+
- sys-img-${ANDROID_ABI}-${ANDROID_TARGET}
14+
script:
15+
- ./gradlew build jacocoTestReport assembleAndroidTest
16+
- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
17+
- emulator -avd test -no-skin -no-audio -no-window &
18+
- android-wait-for-emulator
19+
- adb shell setprop dalvik.vm.dexopt-flags v=n,o=v
20+
- ./gradlew connectedCheck
21+
after_success:
22+
- bash <(curl -s https://codecov.io/bash)

0 commit comments

Comments
 (0)